I’m building a custom dashboard in New Relic to ingest real-time queue stats like waiting count and available agents from Genesys Cloud. The goal is to push these metrics as custom events into NRQL so we can alert on sudden drops in agent availability. I’ve got the OAuth token handling sorted and can pull historical aggregates without issue, but the live stats endpoint is giving me trouble.
I’m hitting GET /api/v2/analytics/stats with a query body specifying the queue ID and the waitingCount and availableAgents metrics. The request returns a 200 OK, but the JSON payload has an empty data array. I’ve verified the queue ID is correct and that agents are actually logged in. Here is the payload I’m sending:
{
"interval": "PT1S",
"select": ["waitingCount", "availableAgents"],
"groupBy": ["queue.id"],
"where": "queue.id = 'my-queue-id-here'"
}
The response looks like this:
{
"data": [],
"meta": {
"count": 0,
"total": 0
}
}
Is there a specific permission or configuration required on the queue to enable this endpoint? Or am I missing a parameter in the query body that forces the data to populate?