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
note string Note of the current group if 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
Required parameters time_since string (YYYY-MM-DD HH:MM:SS)
time_until string (YYYY-MM-DD HH:MM:SS)
grouping array 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
Optional parameters filter[users_id] integer
filter[customers_id] integer
filter[projects_id] integer
filter[services_id] integer
filter[billable] integer 0, 1 oder 2
billable = 2 represents "billable and already billed"
filter[text] / filter[texts_id] string / integer
round_to_minutes (Default 0) integer Active rounding of time durations to the given count of minutes

E.g. "15" for rounding to quarter hours
prepend_customer_to_project_name (Default true) boolean Project names will be prefixed with customer names
calc_also_revenues_for_projects_ with_hard_budget (Default false) 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
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 (YYYY-MM-DD HH:MM:SS)
time_until string (YYYY-MM-DD HH:MM:SS)
Optional parameters filter[users_id] integer
filter[customers_id] integer
filter[projects_id] integer
filter[services_id] integer
filter[billable] integer
filter[text] / filter[texts_id] string / integer
confirm_key string 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 (YYYY-MM-DD HH:MM:SS)
time_until string (YYYY-MM-DD HH:MM:SS)
Optional parameters filter[users_id] integer
filter[customers_id] integer
filter[projects_id] integer
filter[services_id] integer
filter[billable] integer
filter[text] / filter[texts_id] string / integer
confirm_key string 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]
}