The Clockwork API allows you to programmatically interacting with Clockwork data. For example, you could write automation to retrieve a list of worklogs at the end of every month and pass it into your invoicing service.
...
This endpoint retrieves the list of worklogs, and can be scoped with query parameters to narrow the response.
Request query parameters
starting_at | The lower bound of the returned worklogs in the format of YYYY-MM-DD. |
ending_at | The upper bound of the returned worklogs in the format of YYYY-MM-DD. |
project_ids[] | Narrow down the returned worklogs to selected projects only. If both are provided, |
account_id | Narrow down the returned worklogs to the selected authors only.
|
expand | Comma-separated list of response parts to include. Currently supported expand |
items are: Adding the
the attributes can be identified by navigating to Apps>Clockwork, then Settings>Worklogs and opening the Edit worklog attribute dialog. The key is displayed at the bottom of the dialog, like this: |
EXAMPLE CURL
Code Block |
---|
curl 'https://api.clockwork.report/v1/worklogs' \ --get \ --data starting_at=2021-03-01 \ --data ending_at=2021-03-31 \ --data project_keys%5B%5D=SSP \ --data account_id=5ba374cab1a6ab2f054f17b1 \ --header 'Authorization: Token <TOKEN_HERE>' |
...
This endpoint starts your timer for a given issue.
Request query parameters
issue_id integer issue_key | Specify the issue you want to start a timer on. If both are provided, |
EXAMPLE CURL
Code Block |
---|
curl 'https://api.clockwork.report/v1/start_timer' \ --request POST \ --data issue_key=SSP-13 \ --header 'Authorization: Token <TOKEN_HERE>' |
...
This endpoint stops a running timer for a given issue.
Request query parameters
issue_id integer issue_key | Specify the issue you want to stop the timer on. If both are provided, |
EXAMPLE CURL
Code Block |
---|
curl 'https://api.clockwork.report/v1/stop_timer' \ --request POST \ --data issue_key=SSP-13 \ --header 'Authorization: Token <TOKEN_HERE>' |
...