Overview
Statuses
Time Entries
Groups
Agendas
Memberships
Users
Harvest Credentials

Questions? support@harvestapp.com

Harvest Credentials

Show Harvest credentials

GET /users/#{user_id}/harvest_credential

May only retrieve the authenticating user's Harvest credential.

HTTP Response: 200 OK

XML response:

<harvest-credential>
  <id type="integer">23</id>
  <email>basil@fawltytowers.com</email>
  <subdomain>fawlty</subdomain>
  <user-id type="integer">21</user-id>
  <updated-at type="datetime">2008-10-22T10:07:11Z</updated-at>
  <created-at type="datetime">2008-10-02T06:07:27Z</created-at>
</harvest-credential>

JSON response:

{"id": 23, "email": "basil@fawltytowers.com", "subdomain", "fawlty",
 "user_id": 21, "updated_at": "2009/10/22 10:07:11 -0000",
 "created_at": "2009/10/02 06:07:27 -0000"}

Create Harvest credentials

POST /users/#{user_id}/harvest_credential

May only create a Harvest credential for the authenticating user.

HTTP Response: 201 Created
Location: /users/#{user_id}/harvest_credential

Sample XML POST:

<harvest_credential>
  <subdomain>fawlty</subdomain>
  <email>basil@fawltytowers.com</email>
  <password>barcelona</password>
</harvest_credential>

Sample JSON POST:

{"harvest_credential": {"subdomain": "fawlty", "email": "basil@fawltytowers.com",
 "password": "barcelona"}}

When updating a Harvest credential, authorization is completed against Harvest. Response if authorization with Harvest fails (there will also be an error message):

HTTP Response: 400 Bad Request

When trying to create a Harvest credential when the user already has one (there will also be an error message):

HTTP Response: 400 Bad Request


Update Harvest credentials

PUT /users/#{user_id}/harvest_credential

May only update the authenticating user's Harvest credential.

HTTP Response: 200 OK
Location: /users/#{user_id}/harvest_credential

Sample XML PUT:

<harvest_credential>
  <subdomain>fawlty</subdomain>
  <email>basil@fawltytowers.com</email>
  <password>barcelona</password>
</harvest_credential>

Sample JSON PUT:

{"harvest_credential": {"subdomain": "fawlty", "email": "basil@fawltytowers.com",
 "password": "barcelona"}}

When updating a Harvest credential, authorization is completed against Harvest. Response if authorization with Harvest fails (there will also be an error message):

HTTP Response: 400 Bad Request


Delete Harvest credentials

DELETE /users/#{user_id}/harvest_credential

This action will also unlink all group memberships from Harvest.

HTTP Response: 200 OK