API Site Listing with Offset Parameter Not Working

Unless I’m missing it, there’s no GUI way to list Sites by their creation date. So I’m trying to make myself an API URI that I’ll just bookmark and retrieve when I need it. So far so good, but I am not finding the offset parameter to have any effect.

In other words,
https://my.omeka.instance/api/sites?sort_by=created&sort_order=DESC&limit=0&offset=10 shows the same sites as https://onlineexhibits.library.yale.edu/api/sites?sort_by=created&sort_order=DESC&limit=0 (or https://onlineexhibits.library.yale.edu/api/sites?sort_by=created&sort_order=DESC&limit=0&offset=0, since the default is 0). Is this expected behavior, like how per_page is actually following an instance setting? Or should I be able to see sites 10–34 with that offset value in the URI?

(In an attempt to be useful and not constantly clean my house, I’m doing some detail work with our Omeka S instance. No expectation that anyone else is working right now.)

Limit and offset don’t get applied on a normal REST API request: just page and per_page. You should be able to use per_page and page together to choose the results you want, though.

As for sorting by creation date in the admin, we could add that as an option. We really don’t display the dates for sites at all in the admin, the space being a bit cramped with the display of the selected theme.

Ah! Good to know. Hadn’t explored that variant yet.

As for implementing sort by date in the GUI, it’d be helpful for our admins who don’t read JSON, but as a practical matter for me (N=1). I’ve gotten the REST API URI approach to work for public sites and am optimistic about moving on to authenticated API use.

But since I don’t mind taking a moment to fix the doco, I’ll make a PR so it reflects this situation.