Overview
Statuses
Time Entries
Groups
Agendas
Memberships
Users
Harvest Credentials

Questions? support@harvestapp.com

Statuses

Show most recent 50 statuses for a given user and group.

GET /groups/#{group_id}/users/#{user_id}

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 Harvest API.

Cobot entries may be gathered with a user_id of "cobot" or "0".

GET /groups/#{group_id}/users/#{user_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.

GET /statuses/user_timeline/#{user_id}.xml?group_id=#{group_id}

GET /statuses/user_timeline.xml?group_id=#{group_id}

GET /statuses/user_timeline/#{user_id}.xml?group_id=#{group_id}&date=#{date}

Optionally you may use a Twitter-like syntax. If no user_id is provided statuses for the authenticating user will be retrieved. As with the other syntax a date parameter may be added to the URI for targeting specific days. .xml may be replaced with .json for a JSON interaction.

HTTP Response: 200 OK

XML response:

<statuses type="array">
  <status>
    <id type="integer">247</id>
    <type>Note</type>
    <text>API note</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</user-id>
      <name>Basil Fawlty</user-name>
      <email>basil@fawltytowers.com</user-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>A note</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</user-id>
      <name>Basil Fawlty</user-name>
      <email>basil@fawltytowers.com</user-email>
      <avatar-thumb-url>
        http://coopapp.com/uploads/avatars/21/thumb/smile.png?1233860995
      </avatar-thumb-url>
    </user>
  </status>
</statuses>

JSON response:

[{"id": 247, "type": "Note", "text": "API note", "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": "A note", "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"}]

Show a single status

GET /statuses/#{status_id}

This method may only be used to grab plain-text statuses, not time entries. An individual status may only be retrieved for the authenticating user.

GET /statuses/show/#{status_id}.xml

Optionally you may use a Twitter-like syntax. .xml may be replaced with .json for a JSON interaction.

HTTP Response: 200 OK

XML response:

<status>
  <id type="integer">2</id>
  <teype>Note</teype>
  <text>NOTE!</text>
  <group-id type="integer">25</group-id>
  <updated-at type="datetime">2008-06-11T09:25:04-04:00</updated-at>
  <created-at type="datetime">2008-06-11T09:25:04-04:00</created-at>
  <user>
    <id type="integer">21</user-id>
    <name>Basil Fawlty</user-name>
    <email>basil@fawltytowers.com</user-email>
    <avatar-thumb-url>
      http://coopapp.com/uploads/avatars/21/thumb/smile.png?1233860995
    </avatar-thumb-url>
  </user>
</status>

JSON response:

{"id": 2, "type": "Note", "text": "NOTE!", "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/06/11 09:25:04 -0400", "created_at": "2008/06/11 09:25:04 -0400"}

Create new status for authenticated user in given group

POST /groups/#{group_id}/statuses

Only used to create plain-text statuses. To create time entries, use the Time Entries API.

POST /statuses/update.xml?group_id=#{group_id}&status=An%20encoded%20status

Optionally you may use a Twitter-like syntax. .xml may be replaced with .json for a JSON interaction.

HTTP Response: 201 Created
Location: /statuses/#{status_id}

Sample XML POST:

<status>A note</status>

Sample JSON POST:

{"status": "A note"}

Alternative syntax:

<status>
  <text>A note</text>
</status>

Create new status for Cobot in given group

POST /groups/#{group_id}/statuses?key=#{secret_key}

Used to create general messages for the group to read. Such as source code repository updates and application deployment notifications. You are only limited by your imagination.

The secret key is found on your group management screen, in the Group RSS section. No authentication required.

POST /statuses/update.xml?group_id=#{group_id}&status=An%20encoded%20status&key=#{secret_key}

Optionally you may use a Twitter-like syntax. .xml may be replaced with .json for a JSON interaction.

HTTP Response: 201 Created
Location: /statuses/#{status_id}

Sample XML POST:

<status>A note</status>

Sample JSON POST:

{"status": "A note"}

Alternative syntax:

<status>
  <text>A note</text>
</status>

Delete status

DELETE /statuses/#{status_id}

A status may only be deleted for the authenticating user.

DELETE /statuses/destroy/#{status_id}.xml

Optionally you may use a Twitter-like syntax. .xml may be replaced with .json for a JSON interaction. Note: This optional syntax also accepts POST requests.

HTTP Response: 200 OK


Delete status for Cobot

DELETE /statuses/#{status_id}?key=#{secret_key}

Used to delete general messages from the group that were created via the Cobot API hook.

The secret key is found on your group management screen, in the Group RSS section. No authentication required.

POST /statuses/destroy/#{status_id}.xml?key=#{secret_key}

Optionally you may use a Twitter-like syntax. .xml may be replaced with .json for a JSON interaction.

HTTP Response: 200 OK