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.