Trying to request all tickets associated with a certain tag

Hello, I want to get all the tickets with the status 2 or 3 that have a certain tag.
Currently I have this: https://domain.freshdesk.com/api/v2/search/tickets?query=“tag:ArboAnders%20AND%20status:2%20OR%20status:3”&page=1
I think this should work but I still get tickets that have a different tag than the requested one in them.

Hello @tychopycho. If I understand correctly, you are looking to query for the following predicate -

(tag = ArboAnders) and (status = 2 or status = 3).

If that is the case, the query you have used needs to be updated. Do you mind trying the following? (Sorry I have not tested this myself yet).

https://domain.freshdesk.com/api/v2/search/tickets?query=“tag:ArboAnders%20AND%20(status:2%20OR%20status:3)”

I referred example 4 here myself - Freshdesk

1 Like

Hello @satwik. Unfortunately this doesn’t return anything. Yes I want to query like this: (tag = ArboAnders) and (status = 2 or status = 3).

Hi @tychopycho,
I had tried this /api/v2/search/tickets?query=“status:3 or status:2 and tag:test” and it worked. Can you please try it and let us know?

1 Like