Zum Inhalt springen

Time Trackings

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Attribute Description Specifics
break_duration_in_seconds The cumulative duration of all breaks associated with the time tracking Cannot be set
discarded_at Null or timestamp of removal Cannot be set
ends_at Timestamp marking the end of the time tracking Must be set and not earlier than starts_at. Cannot be in the future.
gross_duration_in_seconds The duration of the time tracking, including breaks Cannot be set
net_duration_in_seconds The duration of the time tracking, not including breaks Cannot be set
starts_at Timestamp marking the beginning of the time tracking Must be set and earlier than ends_at.
status Current status of the time tracking Set automatically via time tracking confirm endpoints. Valid values are created, confirmed.
user_id ID of the user that the time tracking belongs to Must be set.
time_tracking_breaks
ends_at Timestamp marking the end of the break Must be set. Cannot be earlier than starts_at. Must fall within the time_tracking range.
starts_at Timestamp marking the beginning of the break Must be set. Must be earlier than ends_at. Must fall within the time_tracking range.
time_tracking_id ID of the time tracking that the break belongs to Must be set.
_delete Indicator to delete the break Don’t send this parameter if you don’t want to delete the break. Set it to true if you do.

Relationship Type
time_tracking_breaks has_many
user belongs_to

Can be included in the request using the meta[permissions] parameter. They indicate which actions the current user can perform on a time tracking event.

Group Description
actions Indicates whether the user can edit, delete, confirm.create (confirm) or confirm.delete (unconfirm) the time tracking.

Example response:

{
"data": {
"id": "893e0b1e-caa0-4950-bt61-dhd0dand969e",
"type": "time_tracking",
"attributes": {
...
}
}
}

This endpoint returns a time tracking.

GET /api/v1/time_trackings/:time_tracking_id

Parameter Description
time_tracking_id The ID of the time tracking to return

Example response:

{
"data": [
{
"id": "893e0b1e-caa0-4950-bt61-dhd0dand969e",
"type": "time_tracking",
"attributes": {
...
}
},
{
...
}
]
}

This endpoint returns the user’s time trackings.

GET /api/v1/time_trackings

Example request:

{
"data": {
"type": "time_tracking",
"attributes": {
"starts_at": "2025-01-01T00:00:00Z",
"ends_at": "2025-01-01T01:00:00Z",
"time_tracking_breaks": [
{
"id": "b2cf4a60-2802-48c2-9759-b3b99e8699bb",
"starts_at": "2025-01-01T00:00:00Z",
"ends_at": "2025-01-01T01:00:00Z"
}
]
}
}
}

Example response:

{
"data": {
"id": "fe25b72c-a16e-4fc3-a4ba-cc5c440dad26",
"type": "time_tracking",
"attributes": {
...
}
}
}

This endpoint updates a time_tracking and its breaks. In order to remove a break from the tracking, pass parameter "_delete": true within the attributes of the break to remove.

PUT /api/v1/time_trackings/:time_tracking_id

Parameter Description
time_tracking_id  ID of the time tracking to be updated

Example response:

{
"data": {
"id": "893e0b1e-caa0-4950-bt61-dhd0dand969e",
"type": "time_tracking",
"attributes": {
...
}
}
}

This endpoint deletes a time tracking.

DELETE /api/v1/time_trackings/:time_tracking_id

Parameter Description
time_tracking_id The ID of the time tracking to delete