Hi,
I want to retrieve all time entries that does not have any tags. Could anybody provide some example/help with this?
Hi there,
You can filter a detailed report and send withoutTags value as true in the request body.
Here is an endpoint for detailed report POST https://reports.api.clockify.me/v1/workspaces/{workspaceId}/reports/detailed
And here is an example what parameters to send in the body
{
“dateRangeStart”: “2021-05-10T00:00:00.000”,
“dateRangeEnd”: “2022-12-16T23:59:59.000”,
“detailedFilter”: {
“page”: 1,
“pageSize”: 1000,
“amountShown”: “EARNED”,
“status”: “ALL”
},
“projects”: {
“contains”: “CONTAINS”,
“ids”: [
“61a74c15d8884f11e74bc5a8”
],
“status”: “active”
},
“withoutTags”: true
}
@Nicola I wonder if the API spec has changed since you posted this as I cannot see withoutTags
as a supported property for the POST /reports/detailed
resource at Clockify API Documentation.
However, swapping the “withoutTags: true
” to:
"tags": {
"contains": "DOES_NOT_CONTAIN",
"ids": ["<string_tag_id>"]
}
Performs what I was after - getting any time entries without a tag that I add once I have migrated that time log to my Jira task.
OK, So after some review and debugging it would appear that the /reports/detailed
resource does not return an accurate payload.
For exampe - where I have logged three time entires on one day, the first of which has been tagged, the latter two have not - I only get returned one entry in the report, the second one (middle without a tag)
Querying using a day with two entries none of them tagged, I only get the first one of that day.
Reverting to using the standard GET .../time-entries
resources and handling tags manually for now.