I’m trying to pull real-time queue statistics from CXone using the /api/v2/analytics/queues/realtime/summary endpoint. The goal is to feed live wait times and agent counts into our Android dashboard via a Kotlin backend service.
I’ve set up the OAuth client credentials flow correctly (no 401s or 403s here), but the response body is consistently empty for the summary array when I query for the last 5 minutes. Here’s the request structure I’m using:
val url = "https://platform.cyberunity.com/api/v2/analytics/queues/realtime/summary"
val queryParams = listOf(
"interval=2023-10-27T14:00:00.000Z/2023-10-27T14:05:00.000Z",
"view=realtime",
"groupBy=queue"
)
val response = httpClient.get(url) {
queryParameters(HashMap(queryParams.map { it.split("=") }.associate { Pair(it[0], it[1]) }))
}
The response comes back as 200 OK, but the JSON looks like this:
{
"summary": [],
"entities": []
}
I’ve verified that agents are actually logged in and handling conversations in the queues I’m targeting during that window. I also tried widening the interval to an hour, same result. I noticed in some docs that realtime views might have a delay, but 5 minutes feels too short for a data blackout.
Is there a specific groupBy parameter or a different endpoint I should be hitting for immediate queue stats? The /api/v2/analytics/conversations/queues/realtime/summary endpoint feels more relevant for call volume, but I need queue-level metrics like currentWaitTime. I’m stumped on why the summary array is blank despite active traffic.