API Documentation
Overview
Time Tracking
Extended REST API
Clients
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions?
Email support@getharvest.com
Overview
Time Tracking
Extended REST API
Clients
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions?
Email support@getharvest.com
Task Assignment: Assigning tasks to projects
Get all tasks assigned to a given project
GET /projects/#{project_id}/task_assignments
HTTP Response: 200 OK
<task-assignments> <task-assignment> <id type="integer">23</id> <project-id type="integer">3</project-id> <task-id type="integer">2878</task-id> <!-- True if task is billable for this project --> <billable type="boolean">true</billable> <!-- True if task was deactivated for project, preventing further hours to be logged against it --> <deactivated type="boolean">true</deactivated> <!-- The estimate (if present) for the task in project --> <estimate type="decimal">80</estimate> <!-- The hourly rate (if present) for the task in project --> <hourly-rate type="decimal">80</hourly-rate> </task-assignment> <task-assignment> ... </task-assignment> </task-assignments>
Get one task assignment
GET /projects/#{project_id}/task_assignments/#{task_assignment_id}
HTTP Response: 200 OK
<task-assignment> <id type="integer">23</id> <project-id type="integer">3</project-id> <task-id type="integer">2878</task-id> <!-- True if task is billable for this project --> <billable type="boolean">true</billable> <!-- True if task was deactivated for project, preventing further hours to be logged against it --> <deactivated type="boolean">true</deactivated> <!-- The estimate (if present) for the task in project --> <estimate type="decimal">80</estimate> <!-- The hourly rate (if present) for the task in project --> <hourly-rate type="decimal">80</hourly-rate> </task-assignment>
Assign a task to a project
POST /projects/#{project_id}/task_assignments
HTTP Response: 201 CreatedLocation: /projects/#{project_id}/task_assignments/#{new_task_assignment_id}
You will have to post the following:
<task> <id type="integer">653425<id> <task>
Create a new task and assign it to a project
POST /projects/#{project_id}/task_assignments/add_with_create_new_task
HTTP Response: 201 CreatedHTTP Response: 201 CreatedLocation: /projects/#{project_id}/task_assignments/#{new_task_assignment_id}
You will have to post the following:
<task> <name>Backend Development</name> </task>
Removing a task from a project
DELETE /projects/#{project_id}/task_assignments/#{task_assignment_id}
HTTP Response: 200 OKNote that Harvest requires one task per project.
Harvest will not remove the task if it has recorded hours against the project. Instead we will archive the assignment. Harvest will reply with a custom Hint header if archiving occurred.
Changing a task for a project
PUT /projects/#{project_id}/task_assignments/#{task_assignment_id}
HTTP Response: 200 Success
You will have to post the following:
<task-assignment> <billable type="boolean">true</billable> <deactivated type="boolean">false</deactivated> <estimate type="decimal">3234</estimate> <hourly-rate type="decimal">100</hourly-rate> </task-assignment>