We’re trying to pull a simple report that aggregates conversation counts by queue and media type using the Analytics API. The goal is just to get a daily breakdown of inbound calls and chats per queue to feed into our internal dashboard. I’ve constructed the query payload based on the documentation, specifying the interval, the metrics, and the group-by fields. The request goes through without any HTTP errors, but the response always comes back with an empty entities array. I’ve verified the date range contains data by running a non-aggregated query on the same endpoint, which returns thousands of records. The issue seems specific to the aggregation logic. Here’s the JSON payload I’m POSTing to /api/v2/analytics/conversations/details/query:
{
"interval": "P1D",
"dateFrom": "2024-05-01T00:00:00.000Z",
"dateTo": "2024-05-02T00:00:00.000Z",
"metrics": [
{
"id": "conversationCount",
"name": "Total Conversations"
}
],
"groupings": [
{
"id": "queueId"
},
{
"id": "mediaType"
}
],
"filter": {
"type": "boolean",
"predicates": [
{
"type": "string",
"path": ".queue.id",
"operator": "in",
"value": ["queue-uuid-1", "queue-uuid-2"]
}
]
}
}
The filter works fine without the groupings object, but adding them breaks the result set. I’ve tried swapping queueId for queueName and even removing the filter entirely, but the entities array stays empty. The response structure looks correct, just devoid of data. I’m using the standard OAuth2 token with analytics:view permissions, which has worked for other analytics calls. Is there a specific syntax requirement for grouping by multiple dimensions in the aggregation query, or is this a known limitation with certain metric types? The docs are vague on how the groupings interact with the boolean filter predicates.