422 resposne for querying | Community
Skip to main content

422 resposne for querying

  • October 9, 2022
  • 1 reply
  • 0 views

Hi, I am trying to query the api for some data which I have on your service.

My url looks like this:

"https://{_mysubdomain}.zendesk.com/api/v2/search.json/export?query=type:user created_at>{_somedate}

Which should give me a lot of users

I then get a lot of users, a 100 at the time of them, and I then iterate through the paginated response.

When I get to page 11, I get a 422 response. Just like in this  question.

The answer to the question here seems  to be to use something called "incrementtal exports"   but I could'nt find notes about how to mitigate my issue in the linked docs.

This link was however also posted, where it looks like I can do queries with more than 1000 results with this endpoint:

GET /api/v2/search/export?query={query}

and about this endpoint is written:

This endpoint is for search queries that will return more than 1000 results. The result set is ordered only by the created_at attribute.

So I tried:

{_subdomain}.zendesk.com/api/v2/search/export/?query=type:user created_at>{_somedate}

 

However, when I run this endpoint, I am returned a 415, with "unsupported media type", which I'm not a 100 % sure what means.

What needs to be done to be able to pull out my data?

 

1 reply

  • October 13, 2022
Hi Ask Harup Sejsbo!
 
Thanks for posting your question to the Community. You can all access all users query search results by using Offset Pagination. This will specifically run the query again picking up where the last/previous page of results left off. 
 
Hope this helps!
 
Erica