CXone Reporting API v2 queue stats returning empty results

Trying to pull real-time queue stats using the CXone Reporting API v2. The GET request to /api/v2/analytics/reporting/queues/realtime returns a 200 OK but the results array is always empty, even though agents are logged in. Here is the query body:

{
 "interval": "5m",
 "groupBy": "queue",
 "aggregates": [{"name": "queue", "type": "count"}]
}

The documentation says this should work for active queues. Any ideas on what’s missing?

The payload structure looks off for real-time endpoints. You don’t need aggregates there. The API expects a specific date range for the query window, not just an interval.

Try this simplified body:

{
 "dateFrom": "2023-10-27T00:00:00.000Z",
 "dateTo": "2023-10-27T23:59:59.999Z",
 "groupBy": "queue"
}

Check if the queueId filter is missing. If you don’t specify a queue, it might return nothing depending on your permissions.