How to get recent tickets in search query api?

Hi team,

We have a specific requirement: whenever a new ticket is created, the app needs to retrieve the ticket based on the created-at time. The API utilized for this purpose is “/api/v2/search/tickets?query=%22created_at:>‘2023-11-14’%20AND%20created_at:<‘2023-11-14’%22&page=1”.

However, a challenge arises when two tickets are created simultaneously, causing the API to fail in fetching the nearest newly created ticket. To illustrate, suppose ticket IDs 20 and 21 are generated concurrently. When the create event is triggered for ticket ID 21, the API fails to include ticket ID 20 in the retrieved data based on the created-at time.

Could you kindly assist us by suggesting an alternative API to address this issue?

Thank you

Hi Team,

Hello all, why any no response for this question, Please help anyone reply for this doubt please kindly response immediately.

thank you

Hi @Annalakshmi_Manivasa,


The filter and search APIs might take a while to update.

Could you please provide more info on the use case, that would help the community to provide the solution?

If you need to perform an action when a ticket is created you can just rely on the ticket-created event.

Or if you want to perform some action just based on the created_at time you can probably use a scheduler event to frequently check tickets by created_at time.

Hope this helps!

Thank you.