Skip to content

Time Trackings

Valid Attributes

AttributeDescriptionSpecifics
ends_atTimestamp marking the end of the time trackingMust be set and not earlier than starts_at. Cannot be in the future.
starts_atTimestamp marking the beginning of the time trackingMust be set and earlier than ends_at.
user_idID of the user that the time tracking belongs toMust be set.
time_tracking_breaks
ends_atTimestamp marking the end of the breakMust be set. Cannot be earlier than starts_at. Must fall within the time_tracking range.
starts_atTimestamp marking the beginning of the breakMust be set. Must be earlier than ends_at. Must fall within the time_tracking range.
time_tracking_idID of the time tracking that the break belongs toMust be set.
_deleteIndicator to delete the breakDon’t send this parameter if you don’t want to delete the break. Set it to true if you do.

Relationships

RelationshipType
time_tracking_breakshas_many
userbelongs_to

Meta-Data: Permissions

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.

GroupDescription
actionsIndicates whether the user can edit the time tracking.

Show

Example response:

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

This endpoint returns a time tracking.

HTTP Request

GET /api/v1/time_trackings/:time_tracking_id

URL Parameters

ParameterDescription
time_tracking_idThe ID of the time tracking to return

List

Example response:

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

This endpoint returns the user’s time trackings.

HTTP Request

GET /api/v1/time_trackings

Update

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.

HTTP Request

PUT /api/v1/time_trackings/:time_tracking_id

URL Parameters

ParameterDescription
time_tracking_id ID of the time tracking to be updated

Delete

Example response:

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

This endpoint deletes a time tracking.

HTTP Request

DELETE /api/v1/time_trackings/:time_tracking_id

URL Parameters

ParameterDescription
time_tracking_idThe ID of the time tracking to delete