Docs state: “The group_by parameter accepts an array of strings representing the dimensions to aggregate by.”
I’m trying to pull interaction data grouped by both queue and media type. I’ve built the query body exactly as shown in the reference docs.
POST /api/v2/analytics/interactions/queues/query
Content-Type: application/json
{
"view": "default",
"date_from": "2023-10-01T00:00:00.000Z",
"date_to": "2023-10-02T00:00:00.000Z",
"group_by": ["queueId", "mediaType"],
"filter": {
"type": "and",
"clauses": []
}
}
The API returns a 400 Bad Request. The error message is vague. It just says “Invalid query structure”. I’ve checked the JSON syntax. It’s valid. The date range is valid. The view is valid.
I’ve tried swapping the order of the group_by array. No change. I’ve tried using "queue" instead of "queueId". Still 400.
What am I missing? The docs don’t list any restrictions on combining these two dimensions. Is there a known issue with multi-dimensional grouping in this endpoint? I’ve been staring at this for an hour. The token is fine. Other queries work. This one keeps dying.