REST-API

The clockodo API allows you to connect clockodo to other systems. Accounting and project management applications or proprietary shell scripts are examples of useful mash-ups with clockodo.

api/clock: Control the stop clock


Get currently running entries

Response
GET /api/clock
Response
{
  "running": [object of type entry]
}

Please refer to the description of the object type "entry" [object of type entry].


Get status information for the clock

Request
GET /api/clock/update
Response
{
  "running": [object of type entry],
  "services": {
    [object of type service],
    ...
  },
  "projects": 
  {
    "id": [integer],
    "name": [string],
    "access": 
    {
      "add": [boolean],
      "edit": [boolean]
    },
    "projects": 
    {
      {
        "id": [integer],
        "name": [string],
        "access": 
        {
          "add": [boolean],
          "edit": [boolean]
        }
      }, 
      ...
    }
  }, ...
  "billable": 
  {
    [customer_id-projects_id]:
    {
      "billable_default": [boolean]
    }, 
    ...
  }
}

Please refer to the description of the object type "entry" [object of type entry]

Please refer to the description of the object type "service" [object of type service]


Search for description texts

 

Provides description texts of the entries for this request.

Anfrage
GET /api/clock/searchtexts
Required parameters -
Optional parameters term, customers_id, projects_id, services_id, billable, time_since, time_until
Response
{
  "texts": {
    [string], 
    ... 
  }
}

Start the clock

Request
POST /api/clock
Required parameters customers_id, services_id, billable
Optional parameters projects_id, text, users_id
Response
{
  "running": [object of type entry]
}

Please refer to the description of the object type "entry" [object of type entry].


Stop the clock

Request
DELETE /api/clock/[ID of the time entry]
Required parameters -
Optional parameters duration, away
Response
{
  "stopped": [object of type entry],
  "running": [object of type entry]
}

Please refer to the description of the object type "entry" [object of type entry].


Change duration

Request
PUT /api/clock/[ID of the entry to change the duration for]
Required parameters duration_before, duration
Optional parameters offset_before
Response
{
  "updated": [object of type entry],
  "running": [object of type entry]
}

Please refer to the description of the object type "entry" [object of type entry].