Clockify just seem to have shut down their old api (I was using). The report API is documented here: https://clockify.me/developers-api#tag-Reports
And this works quite well. For your case, the requests could look like:
curl --request POST \
--url https://reports.api.clockify.me/v1/workspaces/<YOUR WORKSPACE>/reports/summary \
--header 'content-type: application/json' \
--header 'x-api-key: <YOUR API KEY>' \
--data '{
"dateRangeStart": "2020-08-13T00:00:00.000Z",
"dateRangeEnd": "2020-08-13T23:59:59.000Z",
"summaryFilter": {"groups": ["USER"]},
"exportType": "JSON"
}'
There is no "last 24h" though, you will have to adjust the dates yourself.
What might be interesting for your case:
- This example just returns all durations by user. If you want all time entries explicitely, add
TIMEENTRY
as summary group:
"groups": ["USER", "TIMEENTRY"]
- You can also export it to a different format:
JSON
, CSV
, XLSX
, PDF
are supported.