Vor Kurzem aufgerufene Suchen


Keine vor kurzem aufgerufene Suchen

Can Limit the search of tickets ?



Gepostet 30. Juli 2023

Currently i am searching tickets using the search API by passing the query parameter as type: ticket requester:phonenumber, so i get lots of tickets which belong to the end user having phone number same as passed into query. It slows down the response for front end, is there i can pass parameter limit to limit the size of response, i tried with page[size] parameter, i get this repsonse

{
"error":{
"title":"Invalid attribute",
"message":"You passed an invalid value for the page attribute. Invalid parameter: page must be an integer from api/v2/search/index"
}
}

0

1

1 Kommentar

image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Dinesh! If you'd like to limit the number of results that you're returning in your search, I'd recommend using the export search API, as that allows for you to pass a page[size] param. Your query syntax would look a bit different, so I would recommend reviewing those docs to see how that would change. Most notably, you do need to filter to a specific object, in this case tickets.

As an example:

api/v2/search/export?filter[type]=ticket&page[size]=1&query=type:ticket%20requester:%2B12125551212

Let me know if you have any questions!

0


Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Sie finden nicht, wonach Sie suchen?

Neuer Post