Analytics Aggregates query returning empty results for custom intervals despite valid trace context

Hey everyone,

I’m trying to build a custom interval report using the /api/v2/analytics/conversations/agg endpoint. The goal is to pull conversation metrics for specific time windows so I can correlate them with our OpenTelemetry spans. I’ve got the OAuth token sorted, and the trace context is propagating fine into the request headers (X-Request-Id, etc.), but the response payload is always returning an empty data array.

Here is the JSON body I’m sending:

{
 "interval": "PT1H",
 "groupBy": ["conversation.id"],
 "select": ["conversation.duration:sum"],
 "where": {
 "path": "conversation.startTime",
 "operator": "between",
 "value": ["2023-10-01T00:00:00.000Z", "2023-10-01T23:59:59.999Z"]
 },
 "size": 100
}

The API returns a 200 OK status, which is confusing. No validation errors, no 400s. Just:

{
 "data": [],
 "paging": {
 "total": 0,
 "pageSize": 100
 }
}

I’ve verified that there are definitely conversations in this time range by checking the UI. I also tried changing the groupBy to just ["queue.id"] with the same result. Is there a known issue with the between operator in the where clause for this endpoint? Or maybe the timezone handling on the value array is strict about the format?

I’ve been staring at this for hours. The documentation says the where clause supports between, but maybe I’m missing a required field or the date format needs milliseconds? Any ideas on what could be filtering out all results?

Docs state: “Aggregated data is available up to 24 hours after the end of the interval for real-time data, and up to 30 days for historical data.”

If you’re querying a custom interval that ends in the future, or if the interval parameter doesn’t align with the bucketing logic Genesys uses, you get empty results. The API doesn’t interpolate. It returns what’s computed.

Check your interval format. It needs to be ISO 8601 duration, like PT1H or PT15M. If you’re passing a timestamp range in the body, make sure from and to are in UTC.

Also, verify the metrics array. If you ask for a metric that hasn’t been calculated for that specific view (like conversation.duration on a view that only tracks interaction.count), it might return empty or null.

Try this minimal payload first to rule out view configuration issues:

{
 "interval": "PT1H",
 "from": "2023-10-25T10:00:00Z",
 "to": "2023-10-25T11:00:00Z",
 "metrics": [
 "conversation.count"
 ],
 "groupBy": [
 "direction"
 ]
}

If that works, your issue is either the metric selection or the view definition. Check the view’s type field. It must match the entity type you’re querying. conversation metrics need a conversation view. interaction metrics need an interaction view. Mixing them up is a common trap.