Is the ticket export api pagination broken? | Community
Skip to main content

Is the ticket export api pagination broken?

  • October 25, 2022
  • 1 reply
  • 0 views

Hi

I have a use case where I need to collect all the tickets in my zendesk instance.

I do this via the export api:

https://{_subdomain}.zendesk.com/api/v2/search/export.json/

So I do a call to this endpoint in my code (I get a 1000 tickets per page), and then I follow the pagination link to get the next page, by calling the url in the "links/next" field in the response json.

I have between 100.000-200.000 tickets in my database, so I should get quite a lot of pages also.

But, when my code goes through the pages, then i usually gets to around 6-7 pages, and then just stops responding. The endpoint seriously just does'nt send anything back

My Httpclient gives me the error message:

{"The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing."}

So yeah, the api just is'nt responding.

Why is'nt it? Is your api broken? is this some super strange way to throttle requests?

What's happening?

1 reply

Jack23
  • October 26, 2022

What programming language are you using? The request being cancelled is something on your end, if it was the API then you would get a response with an error instead of your request being cancelled before it is sent.

 

To me it looks like you need to set a timeout, when I use Go for example I use a timeout on my http.Client of 30 seconds. It could be that your request isn't shutting down properly and hits a timeout value before it is able to move on.