How do I search tickets by id range

Dear Zammad,

It is possible to get tickets by number range with the following query:
https://…/api/v1/tickets/search?query=number:[25030 TO *]

Is it possible to get a similar ticket range by ID?
https://…/api/v1/tickets/search?query=id:[30 TO *]

Thank you for your time


  • Used Zammad version: 4.1.x
  • Used Zammad installation type: source
  • Operating system: linux

Hi @yene ,

i don’t think its possible to search for a range of ticket numbers at the moment, because it is indexed as text to make it searchable by wildcard search like “123*”. But it could be possible feature request to index it also as integer to make your case possible.

Ticket ids should be possible tho. Try this:

id:>=10 AND id:<20

= greater equal 10 and smaller than 20.

Thank you for the quick answer, now search by id works.

Search for a range of ticket numbers works, but we will avoid it for now to not run into an edge case.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.