We’re trying to build a custom interval report using the GET /api/v2/analytics/conversations/aggregates endpoint. The goal is to pull average handle time and call volume in 15-minute buckets for the last 24 hours, but the entities array in the response is always empty.
I’ve been following the documentation and the basic structure seems right, but I’m clearly missing something in the query payload. Here’s the JSON body we’re sending:
{
"interval": "15min",
"dateFrom": "2023-10-25T00:00:00.000Z",
"dateTo": "2023-10-26T00:00:00.000Z",
"groupings": [
{
"name": "wrapupCode",
"type": "string"
}
],
"select": [
{
"name": "totalHandled",
"type": "sum"
},
{
"name": "talkDuration",
"type": "avg"
}
],
"where": [
{
"path": "routing.queue.id",
"op": "in",
"value": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"]
}
]
}
The request returns a 200 OK, so the authentication and syntax seem fine. The response body looks like this:
{
"paginationInfo": {
"total": 0,
"page": 1,
"pageSize": 1000,
"pages": 1
},
"entities": []
}
I’ve double-checked the queue ID and confirmed there was definitely traffic in that queue during this window. We’re using the Python SDK, and I’ve also tried hitting the endpoint directly with Postman to rule out any library quirks. The timezone is set to UTC in the request, which matches our org settings.
Is there a specific permission set required for the OAuth client to pull aggregate data? Or is the where clause syntax causing the filter to exclude everything? I’ve tried removing the where clause entirely and just querying the whole org, but still get zero results.
Any pointers on what might be blocking the data return would be appreciated. We’re stuck on this for a dashboard build.