Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
90 lines (64 sloc) 2.97 KB

TimeCamp API

This is a REST-style API. TimeCamp API lets you do some basic things with tasks. You can contact us at dev@timecamp.com. We are very open to new ideas and requests regarding API.

Making a request

All URLs start with https://www.timecamp.com/third_party/api. SSL only. That's all!

Authentication

Authentication is very simple. You must put your API token in every API request. You can provide API token in POST or GET http method. You can also provide token in HTTP header: Authorization: <token>. The name for API token field is: api_token Example: https://www.timecamp.com/third_party/api/tasks/format/json/api_token/a36cabi96bba83f826

To get your API token please go to your Account Settings.

Result data formats

  • xml (default)
  • json
  • csv
  • other: rawxml, jsonp, serialized, php, html

Example: https://www.timecamp.com/third_party/api/tasks/format/json/api_token/a36cabi96bba83f826

Sent data formats

We accept request data only in PHP form format. Example:

// good way
id=3621&duration=3600&user_id=123&description=asdf
    
// bad way
{
  "id":"3621",
  "duration":"3600",
  "user_id":"123",
  "description":""
}

If you use jQuery.ajax(), then omit JSON.stringify() and use plain JS object as request data value:

$.ajax({url:'our/api/endpoint', data: {prop:'val', prop2:'val2}}).

Handling errors

If a API request failed, an array of localized error messages and error code will be returned. Response example:

{
"message":"sample message",
"code":401
}

API ready for use

Examples