Accessing record_image via API?

I’m trying to pull data from our public Omeka (v2.5.0) site to display on our general public site.

I can access the API from /api and navigate to /api/collections … What I’d like to be able to get is:

  • item title (ok)
  • item public URL
  • item public record_image (the related image for the record, whether it be collection, item, or exhibit)

In my specific case I’m trying to showcase currently featured exhibits, but as that’s a plugin and not a core feature I’d understand if that is not possible – but hopefully collection data would be?

Is this currently possible?

This is not possible, but you can get the first image of the item, then get the url. The public url for an item is just the base url + /items/show/#id. For an image (the file itself), this is base url + /files/[original|fullsize|thumbnails|square_thumbnails]/[storage_name].

1 Like

Thanks for the reply, Daniel!

While waiting for a reply (as I thought it was not possible), I took a slightly different route and looked at the Exhibit plugin and extending the exposed data sets from the API and supplied a pull request. This (in)directly provides the ability for this behavior. We’ll see if it’s accepted or not though. (From that data point I can then access the file record from the API using the :id filtering.)