API pagination?

Hi! Scalar here…

Apologies if this has been covered before, but I’m not sure how to paginate the Omeka S API return and it doesn’t appear to be documented. Specifically, I’d like to know if I can increase the results-per-page from 25 (default) to, say, 50.

Note that I guess that the page number is ?page=, and this worked as expected.

Thanks!
Craig

Indeed, it doesn’t seem to be documented.

You may use these query parameters:

  • page → number of the page which contains wished resources
  • per_page → number of resources per page to return
  • limit → max results
  • first_result → first result id

So, two ways are possible…

Good point on the lack of documentation… I’ve added a small section on pagination to the “search” section of the API documentation, so it should appear soon.

Hi all,

Fantastic, this is just what I needed!

Thanks for your quick work on this,
Craig