CXone Reporting API v2 /api/v2/analytics/queues/realtime returns empty data for active queues

GET /api/v2/analytics/queues/realtime?interval=2023-10-27T10:00:00.000Z/2023-10-27T10:05:00.000Z&groupBy=queueId

Response: 200 OK
{
“data”:
}

I am integrating real-time queue metrics into my Electron desktop softphone to display agent availability and wait times directly in the system tray. The application uses the Genesys Cloud JavaScript SDK (genesys-cloud/genesyscloud-js) to manage OAuth tokens via a background setInterval refresh to prevent session expiration during long idle periods.

When I execute the request above using fetch in the main process, the HTTP response is successful, but the data array is consistently empty. This occurs even when I know with certainty that agents are logged in and calls are being queued. I have verified the interval parameter adheres to the ISO 8601 duration format required by the API specification.

I attempted to broaden the query by removing the groupBy parameter and expanding the time window to the last 24 hours, yet the result remains an empty array. I suspect this might be related to the data granularity or the specific permissions assigned to the OAuth client ID. The client has the analytics:reports:read scope, which documentation suggests is sufficient.

Is there a specific configuration in the CXone organization settings that suppresses real-time analytics for certain queue types? Or is there a known latency issue where realtime endpoints do not populate until a specific aggregation cycle completes? I need to ensure the queueId filters are not inadvertently excluding all results due to case-sensitivity or UUID formatting issues in the SDK’s internal mapping.

GET /api/v2/analytics/queues/realtime?interval=2023-10-27T10:00:00.000Z/2023-10-27T10:05:00.000Z&groupBy=queueId

This is caused by requesting historical intervals on a real-time endpoint. Use the synchronous /api/v2/analytics/queues/realtime without an interval parameter, or switch to /api/v2/analytics/queues/data with a valid interval for historical data.

// Real-time requires no interval
const metrics = await platformClient.analyticsApi.getAnalyticsQueuesRealtime({
 groupBy: 'queueId'
});

The way I solve this is by hitting the synchronous endpoint without an interval parameter to avoid empty arrays. Check the official docs here: https://developer.nicecxone.com/api/analytics/queues/realtime.

The simplest way to resolve this is to drop the interval parameter entirely since /api/v2/analytics/queues/realtime is synchronous by design. Passing a time range forces the API to look for historical data that doesn’t exist in the real-time buffer, resulting in an empty data array.