I'm currently building a java client for Zendesk's Rest API and something doesn't work as expected.
Recently I've learned that when getting large datasets, Zendesk has introduced pagination. Among the two methods available, offset and cursor-based, it's recommended to use the latter and I'm doing so. For instance, when iterating over tickets or users, I make use of cursor based pagination.
However, cursor based pagination doesn't work with Search API. As long as official documentation says (https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/), within Result Limits, 'The Search API returns up to 1,000 results per query, with a maximum of 100 results per page. See Pagination.'. But when using my code, I get the following error:
"error": {
"title": "Invalid attribute",
"message": "You passed an invalid value for the page attribute. Invalid parameter: page must be an integer from api/v2/users/search"
}
The benefits of cursor based pagination are greater with large data sets. But with the Search API, a given query will only return a maximum of 1,000 records - even if there are more than 1,000 matching records.
For queries that return more than 1,000 records, you may use the Export Search Results endpoint which supports cursor based pagination.
Best,