How can I search tickets by more than one status using the ZD API? | Community
Skip to main content

How can I search tickets by more than one status using the ZD API?

  • November 9, 2022
  • 5 replies
  • 0 views

5 replies

Eric27
  • November 9, 2022
Hey Diego,

You can use the search operators to give you the capability of searching more than one ticket type. 
 
e.g. /api/v2/search.json?query=status<=solved will return all tickets that are less than or equal to a solved state
 
Hope this helps!
 

  • Author
  • November 9, 2022

Thank you, Eric:

 

I just want to pull data only for closed+solved tickets, so I think I need to make another call, but would be great if further API versions allow this ;)

 

 


Eric27
  • November 9, 2022
Hey Diego,

Closed is a greater status than solved so you'd just need to do a greater than or equal to operator (>=).

/api/v2/search.json?query=status>=solved

  • Author
  • November 9, 2022

I did not see it coming, ha ha 😂 This is precisely what I need. 

Thank you very much, Eric. I appreciate a lot!

[SOLVED]


  • Author
  • January 5, 2023

In case there is someone looking for a Python program to get data from Zendesk tickets, you can try this:
https://github.com/diegotco/zendesk_tickets_data