Hi,
I'm trying to count all resolved tickets for the past 14 days, and per day.
So in example, this data is what I want:
2018-01-14: 32
2018-01-15: 15
2018-01-16: 12
2018-01-17: 21
2018-01-18: 34
2018-01-19: 10
...
However, I'm stuck, both the `search` and `view` end-points don't expose the `solved_at` field. Also I can't search on `ticket_metric` or filter the `ticket_metric` end-point.
/api/v2/search.json?query=type:ticket status:solved solved>=2018-01-16 solved<=2018-01-29
https://developer.zendesk.com/rest_api/docs/support/views#list-tickets-from-a-view
https://developer.zendesk.com/rest_api/docs/support/search#list-search-results
How can I manage this? Do I really need to do 14 requests for a per day search? Seems like a real overkill to me...
Seems weird to me, that I may query on a solved date, but the solved date isn't exposed in the results...
Looking forward to your reply.
Gr. Tim
Hi Tim (and thanks McCabe!) -- yes, I can see how it can be seen as a disconnect between searching-on but not getting back that value.
Under the covers, the "solved_at" date is part of a ticket's related metric resource. You can retrieve it for a ticket using the /api/v2/tickets/{ID}/metrics API. Since this value is not directly part of the ticket object itself, it's not returned with those other APIs.
If you're doing a lot of data processing on tickets, the incremental API endpoints may also be helpful.
With all these "raw" API calls, it's up to you to collate related data and do grouping. Zendesk Insights is the product that avoids having to do this work yourself, but the Professional or Enterprise plan is needed. Hope this helps!