Currently, I’m developing a feature for an Omeka S website I’m maintaining that requires the listing of several items at once, based on their connections (the exact number will depend on user preferences while using it). Since that’s a front end feature, I decided to avoid dealing with theme and module creation or modification and opted to retrieve the data through the public REST API. However, in order to avoid making a request for every single item, I need a way to retrieve multiple items at once, based on their IDs.
In this topic, someone made a similar question, but, it seems like, at that time, such a feature would be available only through a module called AppInfo (I didn’t check that module yet). Today, however, it seems to be possible through the standard API. In this page, it is stated that “multiple IDs can be specified using the PHP array syntax (
The problem is that I couldn’t mange to retrieve more than one item at once. Things like “api/items?id=[29,30,31]” doesn’t work, and it isn’t clear to me if “PHP array syntax (
id)” means something else or even if that feature is only available through the PHP API.
For those reasons, I created this topic to ask if what I want to do is indeed possible through the standard REST API and, if it is, what am I doing wrong.
Currently, I’m using Omeka S, version 3.1.0. I’m also not using any module that should interfere with the REST API (I can retrieve items though it without problems, as long as I request only one at a time). In any case, the modules I have installed and activated are:
Advanced Resource Template - version 188.8.131.52
CSV Import - version 2.2.1
Export - version 1.5.0
Guest - version 184.108.40.206
Lockout - version 3.3.4
Mapping - version 1.5.0
RestrictedSites - version 2.1
Guest and Restricted Sites received minor modifications in order to work together to provide access control to the website, but nothing that should affect the API.