Trying to pull interval data for a custom metric using the Analytics Conversations Aggregates endpoint. The goal is to get service level stats per queue for the last hour.
Using the POST request to /api/v2/analytics/conversations/aggregates with this payload:
{
"dateFrom": "2023-10-27T18:00:00.000Z",
"dateTo": "2023-10-27T19:00:00.000Z",
"interval": "PT1H",
"groupings": ["queueId"],
"metrics": ["serviceLevelPercent"],
"filter": {
"type": "AND",
"clauses": [
{
"dimension": "interaction.type",
"operator": "eq",
"value": "voice"
}
]
}
}
Getting a 200 OK, but the entities array is empty. No data at all. Checked the UI reports, the data exists. Same date range, same queue.
Is there a permission issue or a delay in the analytics index? The OAuth token has analytics:view scope. Tried widening the time range to PT24H, still empty.
The timezone is US/Pacific, so the UTC times should be correct. Maybe the dateFrom format is wrong? Or is serviceLevelPercent not available in the aggregates endpoint?
Any ideas on what I’m missing?