Running into a weird issue with the Analytics API. I’m trying to build a report that aggregates conversation data grouped by both queue and media type. The endpoint is GET /api/v2/analytics/conversations/queues/summary.
I’ve been staring at the docs and my code for an hour. The request goes through fine, no 400s or 500s. But the response body is just {"results": []}. Empty. Every time.
Here’s the JSON payload I’m sending in the body (since it’s a GET with a body, which is… fine, I guess):
{
"groupings": [
{
"type": "attribute",
"attribute": "queue.id",
"valueType": "string"
},
{
"type": "attribute",
"attribute": "mediaType",
"valueType": "string"
}
],
"interval": "2023-10-01T00:00:00Z/2023-10-02T00:00:00Z",
"metrics": [
"conversationCount",
"handledCount"
]
}
I’ve tried swapping mediaType for media.type and conversation.mediaType. Nothing. I’ve checked the queue IDs. They exist. There was definitely traffic in that window. I even tried removing the grouping by media type, and then I get data for the queues. So the queue grouping works. It’s just the combination that kills it.
Is there a specific syntax for multi-dimensional groupings in this endpoint? The docs show examples with a single grouping, but nothing about stacking them. I feel like I’m missing a subtle flag or a required filter.
Also, just to be sure, I’m using the Python SDK get_analytics_conversations_queues_summary method. It wraps the HTTP call, but I’ve verified the raw request via Postman too. Same result. Empty list.
Anyone seen this before? Feels like a bug, but I doubt it is. bably just me missing something obvious again.