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/targethours: Read target hours

With this resource you can read all target hour settings. The editing and adding of target hours is currently not possible.


Object type „targethoursRow“

Parameter Type Description
id integer The ID of the target hour settings
users_id integer The related employee's ID
type string Type of target hours:
'weekly': weekly target hours
'monthly': monthly target hours
date_since string Date from which on the target hours apply Format YYYY-MM-DD
date_until string / null Date until which the target hours apply Format YYYY-MM-DD
monday float target hours for Monday Only for weekly target hours
tuesday float target hours for Tuesday Only for weekly target hours
wednesday Mittwoch target hours for Wednesday Only for weekly target hours
thursday float target hours for Thursday Only for weekly target hours
friday float target hours for Friday Only for weekly target hours
saturday float target hours for Saturday Only for weekly target hours
sunday float target hours for Sunday Only for weekly target hours
absence_fixed_credit boolean true if credited absence hours are applied against the average target hours, false if credited absence hours match the target hours of the specific day Only for weekly target hours
compensation_daily float Automatic time compensation per day in minutes Only for weekly target hours
compensation_monthly float Automatic time compensation per day in hours
monthly_target float Monthly target hours to attain Only for monthly target hours
workday_monday boolean Is Monday a work day? Only for monthly target hours
workday_tuesday boolean Is Tuesday a work day? Only for monthly target hours
workday_wednesday boolean Is Wednesday a work day? Only for monthly target hours
workday_thursday boolean Is Thursday a work day? Only for monthly target hours
workday_friday boolean Is Friday a work day? Only for monthly target hours
workday_saturday boolean Is Saturday a work day? Only for monthly target hours
workday_sunday boolean Is Sunday a work day? Only for monthly target hours

List target hours

Request
GET /api/targethours
Optional parameter users_id (integer) Restrict data to this user
Answer
{
  "targethours": 
  {
    [object of type targethoursRow],
    [object of type targethoursRow], 
    ...
  }
}

Request single target hour setting

Request
GET /api/targethours/[ID]
Answer
{
  "targethours": [object of type targethoursRow]
}