Service Desk Practitioners Forum
cancel

ovsd - webapi: Pagination

Highlighted
John_Baker
Super Contributor.

ovsd - webapi: Pagination

Hello,

Is it possible to perform a search, for say incidents, and only query for the first ten, last ten, items X to Y, etc. I.e. to allow me to build a paginated interface.

Thanks,


John
7 REPLIES
Radovan Skolnik
Acclaimed Contributor.

Re: ovsd - webapi: Pagination

No. The search will return all the objects - you need to build pagination on top of it. Only some basic attributes are sent with results, the rest is queried as you ask for them. You can set what attributes are pre-loaded in WEB-API in Administration console in SD to ptimise the performance.
John_Baker
Super Contributor.

Re: ovsd - webapi: Pagination

Hi

Thanks for your response. Is there a recommended approach to solving this problem? I'd assume it's already been done..


John
Radovan Skolnik
Acclaimed Contributor.

Re: ovsd - webapi: Pagination

What do you mean? When you execute the search you will receive all the objects matching your criteria. If you want to paginate, keep the set somewhere and display part of it as page with possibility to fetch next part of the set, etc...

AFAIK there is no way to make SD server to paginate for you...
John_Baker
Super Contributor.

Re: ovsd - webapi: Pagination

Thanks for clarifying; I was indeed wondering if SD server could paginate and I'm disappointed to see it can not.
Radovan Skolnik
Acclaimed Contributor.

Re: ovsd - webapi: Pagination

Ability to paginate on server side would increase complexity much. This way the server finds all the records, creates objects of them, serializes them and sends to client. After that it can free the memory. If it was to paginate it would need to hold up the set found in memory, keep the track of last sent page, etc...
John_Baker
Super Contributor.

Re: ovsd - webapi: Pagination

It should not be complex if the client is required to pass in the start/end indexes - it's just some SQL modifications to the query.

The BMC AR System exposed this feature through the AR API in about 2000...
Radovan Skolnik
Acclaimed Contributor.

Re: ovsd - webapi: Pagination

What I meant was it increases complexity on memory management. Sure using SQL feature for that would be straightforward...