zenpy
zenpy copied to clipboard
Search export support for page[size] parameter
Hello,
I am using the search export api endpoint to export a large portion of created tickets and users in a time period.
https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#export-search-results
I found that Zenpy supports this api with search_export
method (though in the docs it's not mentioned).
I wrote this code to export users
from zenpy import Zenpy
zenpy_client = Zenpy(oauth_token="my_token", subdomain="my_domain")
created_at = "2023-09-14T00:39:54Z"
users = zenpy_client.search_export(query=f"created_at>={created_at}", type="user")
This works well, but the number of results is by default 100. In my case it would be great to increase the page size to speed up the export workload.
In the documentation it is mentioned that the parameter page[size]
can be used, but seems it is not supported by Zenpy search_export method.
you may be right. I'll look into it. I tried the URL in the browser, and the URL parameters do in fact take page[size] correctly.
To prove you correct, just FYI, I used:
export?filter[type]=user&query="*"&page[size]=1
I'd like to issue some tests to this: https://github.com/facetoe/zenpy/pull/629 still WIP
@vilozio Wondering if you can help test the PR out? https://github.com/facetoe/zenpy/pull/629