Inquiry Regarding Ticket Filtering Using Zammad API

Infos:

I am currently exploring the functionalities of the Zammad API and have encountered a challenge regarding ticket filtering. Specifically, I am attempting to utilize the Ticket-Search Endpoint to filter tickets based on both their state_id and the updated_at date fields.

Despite several attempts, I have not been successful in achieving the desired filtering results. My objective is to filter tickets, for instance, with a state_id of 4 and an updated_at date greater than or equal to ‘01.02.2024’.

Could you please advise if this functionality is supported by the Zammad API? If so, could you provide guidance or examples on how to properly structure the query to achieve the desired results?

Thank you very much for your assistance.

Hi @Samuel. Please have a look here to get a better understanding of what is supported and what is not supported.

Hello @fliebe92,

Thank you for directing me to the advanced search documentation. While I have already reviewed the information provided, I’m still encountering difficulty in properly structuring the query to filter tickets based on specific states.

In the documentation here [Preformatted text](http://docs.zammad.org/en/latest/api/ticket/index.html), it’s outlined that I can initiate a GET request for a Ticket Search Query using the endpoint “/api/v1/tickets/search?query={search string}”. However, I’m struggling to decipher how to construct the search string effectively.

For instance, I’m aiming to filter tickets with a state_id of 4 and an updated_at date greater than or equal to ‘01.02.2024’. Unfortunately, I haven’t been able to determine the correct syntax or structure for such a search string.

Could you please provide further guidance or examples on how to properly format the search string to achieve the desired filtering?

Thank you for your assistance.

Hi @Samuel.

curl --location --request GET '<path/to/your/zammad>/api/v1/search?query=state.id%3A%201%20AND%20updated_at%3A%3C%3D2024-02-01' --header 'Content-Type: application/json' --header 'Authorization: Basic <your token>'

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