Invalid group name

I am trying to get a summary report from the clockify API but I get the following error:
“Invalid group name”

My request body looks like this: {“dateRangeStart”:“2024-03-25T12:50:37.179Z”,“dateRangeEnd”:“2024-03-27T12:50:37.179Z”,“sortOrder”:“DESCENDING”,“description”:“”,“rounding”:false,“withoutDescription”:false,“dateRangeType”:“ABSOLUTE”,“amountShown”:“EARNED”,“zoomLevel”:“WEEK”,“userLocale”:“de_DE”,“customFields”:null,“summaryFilter”:{“sortColumn”:“EARNED”,“summaryChartType”:“BILLABILITY”,“groups”:[“65df07c1608d017ead311671”]}}

Any Ideas what I am doing wrong?

Okay, i got the solution.

“groups” is not expecting a groupid, it is expeting a filter by type

Hello @Yanick_Frehner ,

I am fighting with the same issue. Can you please be more specific, what does “filter by type” mean? Or can you provide example of request body?

Thank you

Hello Jan.

Possible group filters are:
PROJECT, CLIENT, TASK, TAG, DATE, WEEK, MONTH, USER, USER_GROUP, TIMEENTRY

Here is a body example of a Summary Report:

{
// REQUIRED
“dateRangeStart”: “2020-05-10T00:00:00.000”,
“dateRangeEnd”: “2020-05-16T23:59:59.000”,
“summaryFilter”: {
“groups”: [
“USER”,
“PROJECT”,
“TIMEENTRY”
],

// SETTINGS (OPTIONAL)
“sortColumn”: “GROUP”
},
“sortOrder”: “DESCENDING”,
“exportType”: “JSON”,
“rounding”: false,
“amountShown”: “EARNED”,
“amounts”: [“EARNED”],
“timeZone”: “America/Los_Angeles”,

// FILTERS (OPTIONAL)
“users”: {
“ids”: [“45fd36c4b0798777049512e2”],
“contains”: “CONTAINS”,
“status”: “ALL”
},
“invoicingState”: “ALL”,
“approvalState”: “ALL”,
“userGroups”: null,
“clients”: null,
“projects”: null,
“tasks”: null,
“tags”: {
“ids”: [“45fd36c4b0798777049512e2”],
“containedInTimeentry”: “DOES_NOT_CONTAIN”,
“status”: “ALL”
},
“billable”: true,
“description”: “”,
“withoutDescription”: true,
“customFields”: [
{
“id”: “5bfd36c4b0798777049512e2”,
“value”: 30,
“type”: “NUMBER”
“numberCondition”: “EQUAL”
“empty”: “false”
}
]
}

I hope this information was helpful.

Cheers!

1 Like

Very helpful, thank you!

Jan