Recherches récentes


Pas de recherche récente

Can Limit the search of tickets ?



Publication le 30 juil. 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 commentaire

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


Vous devez vous connecter pour laisser un commentaire.

Vous ne trouvez pas ce que vous cherchez ?

Nouvelle publication