Weekly report - group and subgroup is required

Hello,

First, thank you for giving me access to that great forum. I learned a lot already and expect to improve :slight_smile:
I am a total newbie in using API. This is the first time I (try to) use a personalized one.
I watched tutos and read the documents, but I am stuck on something. I am trying to get a simple weekly report in Google Sheets for a start. According to the docs, only
dateRangeEnd and dateRangeStart should be required.
However, if I don’t put the “group” and “subgroup” in the body I have the error: {“code”:501,“message”:“Both group and subgroup is required”}

I managed to find that the group could be “project” but I have no clue what to put in “subgroup”
I though it was Time entry, but it’s still not working. {“code”:501,“message”:“Invalid sub group name”}
Here’s my body for info:
{
“archived”: false,
“dateFormat”: “2024-11-01”,
“dateRangeEnd”: “2025-01-11T23:59:59.999Z”,
“dateRangeStart”: “2025-01-06T00:00:00Z”,
“dateRangeType”: “LAST_WEEK”,
“description”: “some description keyword”,
“exportType”: “CSV”,
“zoomLevel”: “WEEK”,
“weeklyFilter”: {
“group”: “PROJECT”,
“subgroup”: “TIMEENTRY”
}
}

Anybody has an idea on how I could get unstuck???
Thanks in advance.

Hello and welcome to the Forum @Sandrine_Pichenot

This filter is indeed mandatory field while triying to do a POST request for the report. Filter depends on the type of the report you’re generating:

  • detailedFilter{} - For Detailed report
  • summaryFilter{} - For Summary report
  • weeklyFilter{} - Weekly report

In your case options for weeklyFilter are:
“group” in “weeklyFilter”:
Possible values: PROJECT, USER

“subgroup” in “weeklyFilter”
Possible values: TIME, EARNED

I’ll post the body of my simple request below so you can try out by simply copy pasting and adjusting the values afterward.
Weekly:

{
    "dateRangeStart": "2024-04-07T00:00:00.000Z",
    "dateRangeEnd": "2024-04-13T23:59:59.000Z",
    "weeklyFilter": {
        "group": "USER",
        "subgroup": "TIME"
    }
}

Detailed:

{
"dateRangeStart": "2024-11-01T00:00:00.000",
"dateRangeEnd": "2025-11-01T00:00:00.000",
"dateRangeType":"ABSOLUTE",
"detailedFilter": {
"page": 1,
"pageSize": 1000,
"sortColumn": "USER"
}
}

Summary:

{
  "dateRangeStart": "2024-06-28T00:00:00.000",
  "dateRangeEnd": "2024-06-28T23:00:00.000",
   "summaryFilter": {
    "groups": [
      "PROJECT",
    ]
  }
}

In the summary possible values: PROJECT, CLIENT, TASK, TAG, DATE, WEEK, MONTH, USER, USER_GROUP and you can choose up to 3 groups at once.

Hope I was able to help. :slight_smile: