API Documentation
Overview
Time Tracking
Extended REST API
Clients
Client Contacts
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions? Contact support
Overview
Time Tracking
Extended REST API
Clients
Client Contacts
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions? Contact support
User Assignment: Assigning people to projects
Get all users assigned to a given project
GET /projects/#{project_id}/user_assignments
HTTP Response: 200 OK
<user-assignments> <user-assignment> <id type="integer">3</id> <user-id type="integer">1</user-id> <project-id type="integer">3</project-id> <!-- If true, user cannot log more hours toward the project --> <deactivated type="boolean">false</deactivated> <!-- Hourly rate of user on current project --> <hourly-rate type="decimal">100.0</hourly-rate> <!-- If true, user has project manager permission on this project --> <is-project-manager type="boolean">true</is-project-manager> </user-assignment> <user-assignment> ... </user-assignment> </user-assignments>
Get a user assignment
GET /projects/#{project_id}/user_assignments/#{user_assignment_id}
HTTP Response: 200 OK
<user-assignment> <id type="integer">3</id> <user-id type="integer">1</user-id> <project-id type="integer">3</project-id> <!-- If true, user cannot log more hours toward the project --> <deactivated type="boolean">false</deactivated> <!-- Hourly rate of user on current project --> <hourly-rate type="decimal">100.0</hourly-rate> <!-- If true, user has project manager permission on this project --> <is-project-manager type="boolean">true</is-project-manager> </user-assignment>
Assign a user to a project
POST /projects/#{project_id}/user_assignments
HTTP Response: 201 CreatedLocation: /projects/#{project_id}/user_assignments/#{new_user_assignment_id}
You will have to post the following:
<user> <id type="integer">23445<id> <user>
Removing a user from a project
DELETE /projects/#{project_id}/user_assignments/#{user_assignment_id}
HTTP Response: 200 OKNote that if the user has recorded hours against the project Harvest will archive the assignment record instead of deleting it. From the end result there is no difference between archiving or deletion, but if you need to make a difference Harvest will reply with a custom Hint header if deletion did not occur.
Changing a user inside a project
PUT /projects/#{project_id}/user_assignments/#{user_assignment_id}
HTTP Response: 200 OKLocation: /projects/#{project_id}/user_assignments/#{new_user_assignment_id}
You will have to post the following:
<user-assignment> <user-id type="integer">1423</user-id> <project-id type="integer">3423</project-id> <deactivated type="boolean">true</deactivated> <hourly-rate type="decimal">95.0</hourly-rate> <is-project-manager type="boolean">false</is-project-manager> </user-assignment>