Rest-API: "query" doesn't seem to work

Trying to use the rest-api in a c# application (basic workflow is to retrieve a list of tickets that meet some criteria, export them to a spreadsheet for some work to be done on them, then use bulk update to update the status of processed tickets)

The problem seems to be that no matter what I use in the “query” I get an “invalid_field” response. I will eventually want to use a custom field, but not even priority or status seem to work
The api path I’m using looks like this:
/api/v2/tickets?include=company,requester&query="cf_myfield:true"

but even
/api/v2/tickets?include=company,requester&query="status:3"

returns the error - Any ideas?

Your REST call needs ‘search’ in the path

https://domain.freshdesk.com/api/v2/search/tickets?query="priority:3"

Thanks - can’t believe I missed that (feeling a bit embarrassed)

Unfortunately, the Search endpoint doesn’t seem to recognise the “requester” include? Is that correct?

It does not let you use requester_id in the filter. Nor is there a way that I see you can get a list of tickets from a user from the API.

It seems very specifically to deny that.

Your only option I can see is doing a view all ticket call and filtering that on your side.

That’s what I suspected - thank you for your assistance

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