Struggling to figure out why the CLI throws a 400 Bad Request when updating a dashboard widget via API in AU-1 BYOC.
Using Genesys Cloud CLI v2.1.0.
Attempting to automate dashboard updates via GitHub Actions.
Endpoint: PUT /api/v2/analytics/dashboards/{dashboardId}/widgets/{widgetId}
The payload is valid JSON. The widget exists. The dashboard exists.
Error Response:
{
“errors”: [
{
“code”: “bad_request”,
“message”: “Invalid widget configuration. Property ‘metricId’ is required but missing or invalid.”
}
]
}
However, the ‘metricId’ is present in the request body.
HCL snippet:
resource "genesyscloud_dashboard_widget" "my_widget" {
dashboard_id = genesyscloud_dashboard.main.id
title = "Avg Handle Time"
type = "metric"
metric_id = "acd/agent/avg-handletime"
x = 0
y = 0
width = 6
height = 4
}
The metric ID acd/agent/avg-handletime is valid. Verified via GET /api/v2/analytics/metrics.
Terraform state shows the resource is created. The CLI update fails immediately after state refresh.
Is there a known issue with metric validation in the CLI for AU-1? Or is the metric ID format different for BYOC instances?
Thanks for the help.