Recent searches


No recent searches

Channel query in Requests API

Answered


Posted Apr 21, 2022

Currently looking to use the `query` param in the Requests API (/api/v2/requests) to ONLY return tickets created using a specific channel (for example: "native_messaging". Is that possible? Not sure how to use zendesk query in this case since it's a nested data object

The response would normally look something like this:
{
    ...
     "via": {  "channel": "native_messaging"  }
}

I've tried the following but none seem to work:

  • /api/v2/requests.json?query=via:channel=messaging
  • /api/v2/requests.json?query=via:messaging
  • /api/v2/requests.json?query=channel:messaging

Thanks in advance for any help!


0

6

6 comments

Hi Xinran!

Is it possible you want to use the https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-requests/#search-requests search requests endpoint instead?

2


Oh whoa. That worked. Thanks!

Do you know if there are any major differences between the 2 APIs other than being able to use "query"?

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Xinran! The Search Requests endpoint gives you access to the query param, which thereby gives you access to all of this. You can also use pagination with Search Requests, which can be very useful depending on the tasks that you are using it for. 

0


This is great. Thanks for the help everyone!

0


I totally agreed with you my problem is solved completely. Thankyou so much

Have a nice day to all…

0


I am new in this forum. I have some questions about this forum. These questions are shown below😉😉:

https://support.zendesk.com/hc/en-us/community/posts/4550970023962-Channel-query-in-Requests-API

If anyone has information about this thread. Please guide me below. I am very confused about that😢 😢 .

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post