How can I list and search tickets by organization id using api (or zenpy)?
I have created organization in zendesk and using API for listing out tickets in our dashboard. I am trying to find way to show tickets for a particular organization. I need at least list and search tickets by organization id.
How can I do that? I am using python backend for this with zenpy.
-
Hi Ruchit Rami
This is pretty simple: Start out in the zendesk client and build your query string.
This might be something like this:
"organization:<your organization> status<closed"
Once you have that,
- url-encode it
- use the api's
https://<youdomain>.zendesk.com/api/v2/search.json?query=<your query>
- fetch the answer.
Note that the answer will be paged, i.e. usually there are 100 tickets per call max, if you found more, then you have to call other pages of the result set, which is well documented in the API doc.
Hope this helps.
Yours truly
Peter
Please sign in to leave a comment.
1 Comments