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/entrygroups: Manage multiple entries


Object type „entrygroup“

Parameter Type Description
groupedBy string Group criterion of the current group
group string Identificator of the current group
name string Description of the curent group
number string Data number of the group (customers number, personnel number, ..) Only if the group criterion is customers_id, projects_id, services_id or users_id
note string Note of the current group Only if the group criterion is customers_id, projects_id or services_id
restrictions array Restrictions which apply to the current group appart from the current groupedBy criterion and time criterions
duration integer Duration of all entries in the group
[revenue] float Revenue of all entries in the group Only with necessary access rights to group
[budget_used] boolean Has budget been used for at least one entry in the group? Only with necessary access rights to group
[has_budget_revenues_ billed] boolean Has at least one group entry, which belongs to a project with hard budget, already been billed? Only with necessary access rights to group
[has_budget_revenues_ not_billed] boolean Has at least one group entry, which belongs to a project with hard budget, not been billed so far? Only with necessary access rights to group
[has_non_budget_revenues_ billed] boolean Has at least one group entry, which does not belong to a project with hard budget, already been billed? Only with necessary access rights to group
[has_non_budget_revenues_ not_billed] boolean Has at least one group entry, which does not belong to a project with hard budget, not been billed so far? Only with necessary access rights to group
[hourly_rate] float Average hourly_rate for the group Only with necessary access rights to group
[hourly_rate_is_equal_ and_has_no_lumpSums] boolean Is the hourly rate equal for all billable entries in the group and does the group not have any lumpsum entries? In this case the revenue can be calculated like this: revenue = hourly_rate * duration
This is useful especially for billing purposes. Only with necessary access rights to group
[duration_without_rounding] integer Duration without rounding Only if rounding has been requested
[revenue_without_rounding] float Revenue without rounding Only if rounding has been requested; only with necessary access rights to group
[rounding_success] boolean Could the revenue be rounded successfully or hasn't it been possible because of different hourly rates in the group Only on the last group if rounding has been requested; only with necessary access rights to group
[sub_groups] array If multiple group criterions have been requested, the next group level will be listed as subgroups

Request groups

Request
GET /api/entrygroups
Optional parameters filter[users_id] integer Filter for a selected co-worker
filter[customers_id] integer Filter for a selected customer
filter[projects_id] integer Filter for a selected project
filter[services_id] integer Filter for a selected service
filter[billable] integer Filter for a billability 0, 1 or 2
billable = 2 represents "billable and already billed"
filter[text] / filter[texts_id] string / integer Filter for a text
round_to_minutes integer Activation of rounding of time durations to the given count of minutes; e.g. "15" for rounding to quarter hours (Default 0)
prepend_customer_to_ project_name boolean Project names will be prefixed with customer names (Default true)
calc_also_revenues_for_ projects_with_hard_budget boolean By default, revenues for projects with hard budgets will no be calculated. If you activate this option, the sum of all revenues to this project can be more than the project budget (Default false)
Required parameters time_since string Filter start time (YYYY-MM-DD HH:MM:SS)
time_until string Filter end time (YYYY-MM-DD HH:MM:SS)
grouping array Grouping of the entries; groups will be nested of multiple grouping option are selected Selected values of this set: [customers_id, projects_id, services_id, users_id, texts_id, billable, is_lumpSum, year, week, month, day]
Example in HTTP POST notation: grouping[]=customers_id&grouping[]=users_id
Response
{
  "groups": 
  {
    [object of type group which may contain subgroups],
    [object of type group which may contain subgroups],
    ...
  }
}

Edit group of entries

Request
PUT /api/entrygroups
Required parameters time_since string Filter start time (YYYY-MM-DD HH:MM:SS)
time_until string Filter end time (YYYY-MM-DD HH:MM:SS)
Optional parameters filter[users_id] integer Filter for a selected co-worker
filter[customers_id] integer Filter for a selected customer
filter[projects_id] integer Filter for a selected project
filter[services_id] integer Filter for a selected service
filter[billable] integer Filter for a billability 0, 1 or 2
billable = 2 represents "billable and already billed"
filter[text] / filter[texts_id] string / integer Filter for a text
users_id int New user assignment to set
customers_id int New customer assignment to set
projects_id int New project assignment to set
services_id int New service assignment to set
billable int New billability to set 0, 1 or 2
billable = 2 represents "billable and already billed"
texts_id / text int / string New text to set
hourly_rate float New hourly rate to set
confirm_key string Confirmation for safety For safety, the api will response with a confirm key with which you have to request once again in order to confirm your edit action
First response (to request without confirm key):
{
  "confirm_key": [string],
  "affected_entries": [integer, count of entries which will be affected]
}
Final response (to request with confirm key):
{
  "success": true,
  "edited_entries": [integer]
}

Delete group of entries

Request
DELETE /api/entrygroups
Required parameters time_since string Filter start time (YYYY-MM-DD HH:MM:SS)
time_until string Filter end time (YYYY-MM-DD HH:MM:SS)
Optional parameters filter[users_id] integer Filter for a selected co-worker
filter[customers_id] integer Filter for a selected customer
filter[projects_id] integer Filter for a selected project
filter[services_id] integer Filter for a selected service
filter[billable] integer Filter for a billability 0, 1 or 2
billable = 2 represents "billable and already billed"
filter[text] / filter[texts_id] string / integer Filter for a text
confirm_key string Confirmation for safety For safety, the api will response with a confirm key with which you have to request once again in order to confirm your edit action
First response (to request without confirm key):
{
  "confirm_key": [string],
  "affected_entries": [integer, count of entries which will be affected]
}
Final response (to request with confirm key):
{
  "success": true,
  "deleted_entries": [integer]
}