Performance View API 500 Error on Custom Metric Aggregation

The /api/v2/analytics/performance/queues endpoint returns a 500 Internal Server Error when applying a custom metric filter for ‘Average Handle Time’ with a granularity of ‘hourly’. Standard metrics load correctly, but any custom aggregate triggers the failure. Has anyone encountered this limitation in the current release?

2 Likes

Custom metric aggregation often fails on the standard performance endpoint due to backend processing limits. Switch to analytics:reports:query. Define the report via HCL for reproducibility.

resource "genesyscloud_insights_report" "custom_ahh" {
 name = "Custom AHH"
 query {
 metrics = ["avg_handle_time"]
 group_by = ["hour"]
 }
}

Query the report ID instead. Avoids the 500.