Trying to construct an aggregation query that groups by both queue and media type, yet the response always collapses the media breakdown into a single total. We’re POSTing to /api/v2/analytics/queues/summary with {“groupBys”: [“queue”, “mediaType”], “interval”: “PT1H”} and getting a 200, but the data array just lists queues without splitting out voice versus chat. The documentation implies multi-axis grouping works, so is there a missing flag in the metrics definition or does the engine simply ignore the second groupBys entry?
The summary endpoint is just that. A summary. It doesn’t support multi-dimensional grouping like the data endpoint does. You’re hitting a wall because the API design separates high-level stats from detailed granular data.
If you need to break down by queue AND mediaType, you have to switch to the /api/v2/analytics/queues/data endpoint. The summary endpoint aggregates everything into a single bucket per queue. The data endpoint lets you define the exact dimensions.
Here is how the request body looks for the data endpoint in the .NET SDK. You’ll notice the groupBys array handles both dimensions.
using GenesysCloud.Analytics;
using GenesysCloud.Analytics.Model;
// Setup your client
var analyticsApi = new AnalyticsApi(platformClient);
// Define the query
var query = new AggregationQuery
{
Interval = "PT1H",
GroupBys = new List<string> { "queue", "mediaType" },
Metrics = new List<string> { "offerCount", "handleTime", "wrapUpTime" },
// Optional: filter by specific queues if the list is too large
Query = "queue.id IN ('queue-id-1', 'queue-id-2')"
};
try
{
var response = await analyticsApi.PostAnalyticsQueuesData(query);
// Response.Data now contains objects with both Queue and MediaType properties
foreach (var item in response.Data)
{
Console.WriteLine($"Queue: {item.Queue.Name}, Media: {item.MediaType}, Offers: {item.OfferCount}");
}
}
catch (ApiException e)
{
Console.WriteLine(e.Message);
}
The docs for PostAnalyticsQueuesSummary state: “Returns summary statistics for queues.” It doesn’t mention multi-axis grouping. The PostAnalyticsQueuesData docs explicitly list mediaType as a valid groupBy dimension alongside queue.
Just be careful with the date range. The data endpoint has stricter limits on how much data you can pull in one shot compared to summary. If you’re pulling a week of hourly data for 50 queues across 5 media types, you might hit the row limit. You’ll need to paginate or slice the time range.