Analytics Aggregates 400 when grouping by queue and media type

Running into a wall with the Analytics Aggregates API again. We’re trying to pull data for our OTel trace correlation dashboard, specifically grouping by queue and media_type. The goal is to map trace spans to specific queue handling metrics.

Here’s the payload I’m sending to POST /api/v2/analytics/conversations/aggregates:

{
 "interval": "PT1H",
 "dateFrom": "2023-10-01T00:00:00.000Z",
 "dateTo": "2023-10-02T00:00:00.000Z",
 "groupBy": ["queue", "media_type"],
 "select": ["handleDuration", "wrapUpDuration"],
 "where": [
 {
 "path": "mediaType",
 "operator": "eq",
 "value": "voice"
 }
 ]
}

The response is a hard 400 Bad Request:

“The request contains an invalid query parameter.”

I’ve checked the docs for groupBy fields. queue is valid. media_type is listed as a valid bucket. I even tried removing the where clause to isolate the issue, but it still fails. If I remove media_type from the groupBy array and just keep queue, it works fine. Same if I just keep media_type. It’s only when I combine them that it blows up.

Is there a restriction on combining these specific dimensions? Or is the syntax for the array different than I think? I’m using the Python SDK genesyscloud.analytics.get_analytics_conversations_aggregates. The error trace doesn’t give much more info than the generic message.

We’ve been debugging this for a day. The span context injection is working fine on the Data Action side, but we can’t get the baseline metrics from the API to correlate against. Feels like a quirk in the aggregation engine.

Anyone else hit this? Or am I missing a subtle constraint on composite groupBy keys in the v2 API? The docs don’t mention any exclusion lists for dimension pairs. Just trying to get the query to parse so I can feed the data into Jaeger.

Also, timezone is UTC in the payload. Not sure if that’s relevant. But the error persists.

Any pointers? I’m stuck.