Is it possible to lock timeEntrys via API?
https://api.clockify.me/api
I have tried google but did not find anything.
Is it possible to lock timeEntrys via API?
https://api.clockify.me/api
I have tried google but did not find anything.
It doesn't look like it. I don't have access to time locking so it's a bit hard to test, but doing
curl -X PUT \
https://api.clockify.me/api/workspaces/{workspace ID}/timeEntries/{timeEntryID} \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: value' \
-H 'cache-control: no-cache' \
-d '{
"start": "start time (in UTC)",
"billable": "false",
"description": "",
"projectId": "",
"isLocked":true,
"end": "end time (in UTC)",
"tagIds": [
"tag ids"
]
}'
Might do the trick - I don't get any errors when I do this but I also can't lock time entries so it doesn't change the returned data (which includes a "isLocked" field).
One note about this call: You must include everything in order for the fields to not be changed. For example, if you have a project ID set to this time entry, make sure to pass it in (don't leave out that field), otherwise it will be reset back to null. I also sometimes get errors if I don't pass in certain fields, so even though the UpdateTimeEntryRequest says it only requires the "Billable" field, I believe it actually requires more than that. Here's a link to that: https://clockify.github.io/clockify_api_docs/#/definitions/UpdateTimeEntryRequest