Hi,
In the ticket metrics endpoint docs under Show Ticket Metrics
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_metrics/#show-ticket-metrics
it suggests that when we call the https://{subdomain}.zendesk.com/api/v2/ticket_metrics/{ticket_metric_id} endpoint, we should get back a list of objects under the ticket_metric key:
response -> {"ticket_metric": [{...}]}
When I hit that endpoint, I actually get back a single object under the ticket_metric key:
response -> {"ticket_metric": {...}}
I'm wondering if there was just a typo in the docs and a single object is always returned under the ticket_metric key, or if it's possible for the value under that key to be either a list or an object.
note: the docs listed two endpoints in the same section:
GET /api/v2/ticket_metrics/{ticket_metric_id}
GET /api/v2/tickets/{ticket_id}/metrics
I hit both endpoints and in both cases got back a single object rather than a list of objects.
Hi Jacob,
Thanks for reaching out! Taking a further look it may just be a typo in our doc and those array brackets shouldn't be there. From my end, both endpoints returns the ticket_metric key with a top level object as the value with a few nested objects inside it. I'll share this with our team to get that doc updated. Nice call out!
Don't hesitate to let us know if there's any other way we can assist.
Best,
Erica - Dev Support Engineer