Time Trackings
Valid Attributes
Attribute | Description | Specifics |
---|---|---|
ends_at | Timestamp marking the end of the time tracking | Must be set and not earlier than starts_at . Cannot be in the future. |
starts_at | Timestamp marking the beginning of the time tracking | Must be set and earlier than ends_at . |
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. |
Relationships
Relationship | Type |
---|---|
time_tracking_breaks | has_many |
user | belongs_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.
Group | Description |
---|---|
actions | Indicates 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
Parameter | Description |
---|---|
time_tracking_id | The 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
Parameter | Description |
---|---|
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
Parameter | Description |
---|---|
time_tracking_id | The ID of the time tracking to delete |