Display Search API returns only 10 rows - 1.8.0-alpha2

The Display Search API seems to return only the first 10 rows. How do I get the API to return all the displays? If this is due to pagination support, how do I control the page size that is returned? The Swagger API does not mention any query parameter I can set to do this. I’m using Xibo 1.8.0-alpha2

curl -i -X GET
-H “Authorization:Bearer xyzblahblahxyz”
https://myxiboserver/xibo/api/display

You would use the start and length parameters - it should have sent you a link header back containing paging links - perhaps that doesn’t work yet (although I thought it did)

Thanks Dan, it does return the “X-Total-Count” and “Link” headers which I missed. In my case they look like this:

X-Total-Count: 22
Link: https://myxiboserver/xibo/api/display?start20&size=10; rel=“next”, https://myxiboserver/xibo/api/display?start=0&size=10; rel=“first”

The “next” part of the link seems to be not formed correctly. Also instead of “length” I see “size” as the query parameter. Looks like a bug to me.

The start and length query parameters works perfectly. Thanks again

-Ravi

Ah, my bad:

Glad the parameters are working at least!

@Dan, can you please tell us a bit more about these? I understand what “start”, “size”, “next” and “first” are, how do we do previous? maybe “prev”? Am I missing anything else?

There should be a “prev” link, which is essentially the records before the ones you are looking at…

i.e. if you are on start=20, length = 10. “prev” would be start=10, length=10

I hope that makes sense?

I think that makes sense. How should we be passing them back to the api? In the header using the same parameter names?

Yes, exactly right :smile: