Statuses
Time Entries
Groups
Agendas
Memberships
Users
Harvest Credentials
Questions? support@harvestapp.com
Time entries
Check if authenticated user has Harvest access for the given group
GET /groups/#{group_id}/has_harvest_access
For a user to have Harvest access within a group, he must have entered his credentials and linked his Harvest account to the group. Further, there are various tests the group leader and Harvest account must pass for access to be confirmed.
HTTP Response: 200 OK
If any access test fails, an error message will be returned with the following response:
HTTP Response: 403 Forbidden
Create new time entry for authenticated user
POST /groups/#{group_id}/day_entries
HTTP Response: 201 Created
Location: /groups/#{group_id}/day_entries/#{day_entry_id}
Sample XML POST:
<status> <text>Arguing with people</text> <hours>1.07</hours> <project_id>52234</project_id> <task_id>67567</task_id> </status>
Sample JSON POST:
{"status": {"text": "Arguing with people", "hours": 1.07, "project_id": 52234,
"task_id": 67567}}
Update time entry
PUT /groups/#{group_id}/day_entries/#{day_entry_id}
HTTP Response: 200 OK
Location: /groups/#{group_id}/day_entries/#{day_entry_id}
Sample XML PUT:
<status> <text>Arguing with _customers_</text> <hours>1.07</hours> <project_id>52234</project_id> <task_id>67567</task_id> </status>
Sample JSON PUT:
{"status": {"text": "Arguing with _customers_", "hours": 1.07, "project_id": 52234,
"task_id": 67567}}
Toggle time entry
GET /groups/#{group_id}/day_entries/#{day_entry_id}/toggle_timer
Starts/stops a timer for the given time entry.
HTTP Response: 200 OK
XML response:
<status> <id type="integer">1373078</id> <type>DayEntry</type> <text>Timer with a note</text> <hours type="float">22.91</hours> <client>City of Torquay</client> <project>Gourmet Night</project> <task>Put butter on trays</task> <group-id type="integer">25</group-id> <timer-started-at type="datetime">2008-11-19T17:13:12Z</timer-started-at> <spent-at type="date">2008-11-19</spent-at> <created-at type="datetime">2008-11-19T17:13:12Z</created-at> <user> <id type="integer">25</user-id> <name>Polly Sherman</user-name> <email>polly@fawltytowers.com</user-email> <avatar-thumb-url> http://coopapp.com/uploads/avatars/25/thumb/frown.png?1233863412 </avatar-thumb-url> </user> </status>
JSON response:
{"id": 1373078, "type": "DayEntry", "text": "Timer with a note", "hours": 22.91,
"client": "City of Torquay", "project": "Gourmet Night", "task": "Put Butter on Trays",
"group_id": 25, "timer_started_at": "2008/11/19 17:13:12 +0000",
"user": {"id": 25, "name": "Polly Sherman", "email": "polly@fawltytowers.com",
"avatar_thumb_url": "http://coopapp.com/uploads/avatars/25/thumb/frown.png?1233863"},
"spent_at": "2008/11/19", "created_at": "2008/11/19 17:13:12 +0000"}
Delete time entry
DELETE /groups/#{group_id}/day_entries/#{day_entry_id}
This action will also remove the time entry from Harvest.
HTTP Response: 200 OK
Retrieve Harvest project and task lists
GET /users/#{user_id}/harvest_project_list
Retrieves a list of projects the user may report to in Harvest, as well as the tasks that belong to those projects.
HTTP Response: 200 OK
XML response:
<projects type="array"> <project> <name>Gourment Night</name> <client>City of Torquay</client> <id type="integer">61884</id> <tasks type="array"> <task> <name>Admin</name> <billable type="boolean">false</billable> <id type="integer">10</id> </task> <task> <name>Prepare meal</name> <billable type="boolean">true</billable> <id type="integer">11</id> </task> <task> <name>Distribute fliers</name> <billable type="boolean">false</billable> <id type="integer">19</id> </task> </tasks> </project> <project> . . . </project> </projects>
JSON response:
[{"name": "Gourmet Night", "client": "City of Torquay", "id": 61884,
"tasks": [{"name": "Admin", "billable": false, "id": 10},
{"name": "Prepare meal", "billable": true, "id": 11},
{"name": "Distribute fliers", "billable": false, "id": 19}]}]