The API call to GET /api/v2/analytics/conversations/aggregate is returning a valid 200 OK status, but the items array in the response body is always empty. I’m trying to build a custom interval report for call duration metrics using the .NET SDK.
Here is the JSON payload I’m constructing for the query:
{
"interval": "PT1H",
"dateFrom": "2023-10-01T00:00:00.000Z",
"dateTo": "2023-10-01T23:59:59.999Z",
"groupBy": ["queueId"],
"metrics": ["talkDuration"],
"view": "conversation"
}
I have verified that the queueId values in the groupBy array match the actual queue IDs in our CXone environment. I also confirmed that there was call volume during this time period by checking the UI reports. The date range is exactly 24 hours, so it shouldn’t be hitting any limit on the number of intervals returned.
The SDK method AnalyticsApi.GetConversationsAggregateAsync doesn’t throw an exception, it just returns the empty list. I’ve tried changing the interval to PT30M and PT5M but the result is the same. Is there a specific permission requirement for the client credentials token used here that I’m missing? Or perhaps the view parameter needs to be something other than conversation for duration metrics?