Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search export support for page[size] parameter #595

Closed
vilozio opened this issue Oct 3, 2023 · 4 comments · Fixed by #629
Closed

Search export support for page[size] parameter #595

vilozio opened this issue Oct 3, 2023 · 4 comments · Fixed by #629

Comments

@vilozio
Copy link

vilozio commented Oct 3, 2023

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.

@cryptomail
Copy link
Collaborator

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.

@cryptomail
Copy link
Collaborator

To prove you correct, just FYI, I used:

export?filter[type]=user&query="*"&page[size]=1

@cryptomail
Copy link
Collaborator

I'd like to issue some tests to this: #629 still WIP

cryptomail added a commit that referenced this issue May 13, 2024
@cryptomail
Copy link
Collaborator

@vilozio Wondering if you can help test the PR out? #629

cryptomail added a commit that referenced this issue May 13, 2024
* Issue #595 fixes search export CBP

* Added changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants