New Feature request: Ability to export ALL Ticket Comments for ALL tickets in one request | Community
Skip to main content

New Feature request: Ability to export ALL Ticket Comments for ALL tickets in one request

  • July 29, 2022
  • 2 replies
  • 0 views

Volodymyr12

Hello. I'm developing a little web-application, which exports tickets via API to CSV file. I need also to export Ticket Comments for those tickets. I can read Tickets via (GET api/v2/tickets) request, but, to read ticket comments i should do (GET api/v2/tickets/{ticket_id}/comments) for each ticket. If I have 10 000 tickets, for example, I should do 10 000 requests through cycle. This is bad decision in two reasons: such cycle will eat much resources of my server and make 10 000 requests to your server, which will look like DDOS attack. Will be good feature, if you add a "comment" field to all tickets in the response for (GET api/v2/tickets) request or if you add API route to read all comments in one request with some key, related to each ticket

2 replies

Jack23
  • July 29, 2022

I think the best way to get ticket comments is to get them separately using the incremental ticket events export API and sideload comment_events, then filter everything that isn't a comment out and then loop through the comment events and your tickets and match all comments to their respective tickets. 

But yes I agree, Zendesk makes this far too convoluted and there should be an easier way to get all comments for tickets.


Volodymyr12
  • Author
  • July 29, 2022

I'd say, this is not the best way, but only one available. If I go through this way, I should develop some function to filter certain data from response and to map that data to the tickets