Reporting API: Getting tHandle/tAcw/tHold by 30-min intervals

Hey folks,

I’m trying to pull agent utilization metrics (specifically tHandle, tAcw, and tHold) broken down into 30-minute intervals. The goal is to see how busy agents are throughout the day in finer granularity than the hourly default.

I’m hitting /api/v2/analytics/agents/summary with the following query params:

interval=PT30M&dateFrom=2023-10-27T00:00:00.000Z&dateTo=2023-10-27T23:59:59.999Z&grouping=agent&metric=tHandle,tAcw,tHold

The request returns a 200 OK, but the groupBy section only has agent. The timeGroup is missing from the response entirely, so I’m just getting one big bucket of totals for the whole day. I tried adding timeGrouping=PT30M to the query string, but the API complains that timeGrouping isn’t a valid parameter for this endpoint.

Is there a different endpoint I should be using for time-series data, or am I missing a header? The docs for agents/summary seem to imply it supports time grouping, but I can’t get it to work.

Here’s a snippet of the response I’m getting:

{
 "groupBy": {
 "agent": [
 {
 "id": "12345",
 "name": "John Doe"
 }
 ]
 },
 "results": [
 {
 "groupBy": {
 "agent": {
 "id": "12345",
 "name": "John Doe"
 }
 },
 "metrics": {
 "tHandle": { "sum": 1200000 },
 "tAcw": { "sum": 300000 },
 "tHold": { "sum": 50000 }
 }
 }
 ]
}

No time breakdown. Just totals. I’ve tried switching to /api/v2/analytics/agents/realtime but that only gives me current state, not historical intervals.

Any ideas on how to force that time grouping?