Overview
When batch importing metadata (items in Omeka terminology) and images (media in Omeka terminology) into Omeka S, the Bulk Import module is commonly used.
https://github.com/Daniel-KM/Omeka-S-module-BulkImport
However, it is also possible to register via the REST API provided by Omeka S.
This article introduces a program I created for batch image registration using this API.
Reason for Development
The latest version of the Bulk Import module allows you to choose whether to stop or continue when an error occurs, but older versions of the module do not have this option. As a result, when batch registering images, there were cases where images were missing each time image retrieval failed.

To address this issue, I created a program for batch image registration using the API.
Usage
You can check the sample in the following notebook.
https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/Omeka_Sへの画像一括登録用プログラム.ipynb
First, create a CSV file for registration. This program targets only batch registration of IIIF images, and the Media URL should specify the IIIF image URL (including info.json).
| Item Identifier | Media Url |
|---|---|
| post_226 | https://nakamura196.github.io/iiif_static/files/tile/kunshujo/info.json |
When running on Google Colab, upload the CSV file.
Next, set the API authentication information and endpoint URL.
For the property_id value, specify the ID of the property that has the value specified in the Item Identifier of the above CSV. Here, since we use dcterms:identifier, we specify 10, which is its internal Omeka ID.
Processing Details
Registration is performed only when there is a discrepancy between the input CSV file and the current count.
For example, if the CSV file specifies that 2 media items should be associated with an item but Omeka only has 1 media item associated, the associated media for that item will be deleted and re-registered based on the CSV file contents.
This enables batch registration of new media as well as correction of media that were missed during registration.
Summary
I hope this is helpful as an alternative method for batch image registration besides Bulk Import.