Statuses
Time Entries
Groups
Agendas
Memberships
Users
Harvest Credentials
Questions? support@harvestapp.com
Groups
Show authorized groups for authenticating user
GET /groups
HTTP Response: 200 OK
XML response:
<groups type="array"> <group> <id type="integer">25</id> <name>Fawlty Towers</name> <timezone>London</timezone> <updated-at type="datetime">2008-10-30T16:56:04-04:00</updated-at> <created-at type="datetime">2008-06-11T07:06:39-04:00</created-at> </group> <group> <id type="integer">34</id> <name>Fawlty Towers - Argentina</name> <timezone>Buenos Aires</timezone> <updated-at type="datetime">2008-10-30T14:47:06-04:00</updated-at> <created-at type="datetime">2008-09-04T07:17:37-04:00</created-at> </group> </groups>
JSON response:
[{"id": 25, "name": "Fawlty Towers", "timezone": "London",
"updated_at": "2008/10/30 16:56:04 -0400", "created_at": "2008/06/11 07:06:39 -0400"},
{"id": 34, "name": "Fawlty Towers - Argentina", "timezone": "Buenos Aires",
"updated_at": "2008/10/30 14:47:06 -0400", "created_at": "2008/09/04 07:17:37 -0400"}]
Show most recent 50 statuses for a given group
GET /groups/#{group_id}/statuses
Statuses may include time entries or plain text-only entries. A time entry is specified with a type node equal to "DayEntry". A text-only entry is specified with a type node equal to "Note". The ID node of DayEntries and Notes are not mutually exclusive. DayEntries provide additional information gathered from Harvest, which can be used for interacting with the Time Entry API.
GET /groups/#{group_id}
Deprecated URL.
GET /groups/#{group_id}/#{date}
Optionally you may ask for entries for a given date. The format is YYYYMMDD. When providing a specific date, all statuses for the day will be returned even if the quantity is greater than 50.
HTTP Response: 200 OK
XML response:
<statuses type="array"> <status> <id type="integer">247</id> <type>Note</type> <text>Note 1</text> <group-id type="integer">25</group-id> <updated-at type="datetime">2008-11-19T20:19:45Z</updated-at> <created-at type="datetime">2008-11-19T20:19:45Z</created-at> <user> <id type="integer">21</id> <name>Basil Fawlty</uame> <email>basil@fawltytowers.com</email> <avatar-thumb-url> http://coopapp.com/uploads/avatars/21/thumb/smile.png?1233860995 </avatar-thumb-url> </user> </status> <status> <id type="integer">246</id> <type>Note</type> <text>Note 2</text> <group-id type="integer">25</group-id> <updated-at type="datetime">2008-11-19T17:41:48Z</updated-at> <created-at type="datetime">2008-11-19T17:41:48Z</created-at> <user> <id type="integer">21</id> <name>Basil Fawlty</name> <email>basil@fawltytowers.com</email> <avatar-thumb-url> http://coopapp.com/uploads/avatars/21/thumb/smile.png?1233860995 </avatar-thumb-url> </user> </status> <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</id> <name>Polly Sherman</name> <email>polly@fawltytowers.com</email> <avatar-thumb-url> http://coopapp.com/uploads/avatars/25/thumb/frown.png?1233863214 </avatar-thumb-url> </user> </status> </statuses>
JSON response:
[{"id": 247, "type": "Note", "text": "Note 1", "group_id", 25,
"user": {"id": 21, "name": "Basil Fawlty", "email": "basil@fawltytowers.com",
"avatar_thumb_url": "http://coopapp.com/uploads/avatars/21/thumb/smile.png?1233860995"},
"updated_at": "2008/11/19 20:19:45 +0000", "created_at": "2008/11/19 20:19:45 +0000"},
{"id": 246, "type": "Note", "text": "Note 2", "group_id", 25,
"user": {"id": 21, "name": "Basil Fawlty", "email": "basil@fawltytowers.com",
"avatar_thumb_url": "http://coopapp.com/uploads/avatars/21/thumb/smile.png?1233860995"},
"updated_at": "2008/11/19 17:41:48 +0000", "created_at": "2008/11/19 17:41:48 +0000"},
{"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", "spent_at": "2008/11/19",
"user": {"id": 25, "name": "Polly Sherman", "email": "polly@fawltytowers.com",
"avatar_thumb_url": "http://coopapp.com/uploads/avatars/25/thumb/frown.png?1233863214"},
"created_at": "2008/11/19 17:13:12 +0000"}]
Create group
POST /groups
Creates a new Co-op group. If the optional member_emails node is provided, sends out invitation emails to all valid email addresses.
HTTP Response: 201 Created
Location: /groups/#{group_id}
Sample XML POST:
<group> <name>Fawlty Towers</name> <timezone>London</timezone> <member_emails>sybil@fawltytowers.com, polly@fawltytowers.com</member_emails> </group>
Sample JSON POST:
{"group": {"name": "Fawlty Towers", "timezone": "London",
"member_emails": "sybil@fawltytowers.com, polly@fawltytowers.com"}}
Note: We only accept a limited set of values for the timezone attribute.
Update group
PUT /groups/#{group_id}
To invite members to an existing group, please use the memberships API.
HTTP Response: 200 OK
Location: /groups/#{group_id}
Sample XML PUT:
<group> <name>Fawlty Towers</name> <timezone>London</timezone> </group>
Sample JSON PUT:
{"group": {"name": "Fawlty Towers", "timezone": "London"}}
Update group owner
PUT /groups/#{group_id}/change_owner
Changes the group owner to a different member of the group. The current group owner is the only user who can make this call.
HTTP Response: 200 OK
Location: /groups/#{group_id}
Sample XML PUT:
<new_group_owner_id>5</new_group_owner_id>
Sample JSON PUT:
{"new_group_owner_id": 5}
Delete group
DELETE /groups/#{group_id}
This action will also destroy all text-only entries written to the group. Harvest time entries will not be affected.
HTTP Response: 200 OK