RO-Crate Importer — Administrator Guide#
Overview#
The RO-Crate importer is part of the invenio-importer package.
It is disabled by default and must be explicitly enabled in invenio.cfg.
When enabled, authenticated users can upload an ro-crate-metadata.json file and create a draft record from it.
The importer supports pluggable profiles for different RO-Crate sources.
Prerequisites#
If RO-Crate files reference data files by URL, those files are attached as remote files. The remote files feature must be enabled and the relevant domains must be on the allowed-domains list.
See Remote Files — Administrator Guide.
Enabling the importer#
Add the following to invenio.cfg:
IMPORTER_ENABLED = True
IMPORTERS = [
{
"class": "invenio_importer.importers.rocrate:ROCrateImporter",
"options": {},
"ui": {
"label": "RO-Crate",
"description": "Import a draft from an RO-Crate metadata file.",
"icon": "file code",
"component": "rocrate",
},
}
]
The importer appears in the user-facing import modal immediately after the application restarts.
Profile configuration#
Two profiles are included by default:
| Profile ID | Label | Use case |
|---|---|---|
base |
Generic RO-Crate | Standard RO-Crate files from any source |
metax |
Metax (Fairdata) | RO-Crates exported from the Finnish Fairdata Metax catalogue |
To add, remove, or rename profiles, override IMPORTER_ROCRATE_PROFILES in invenio.cfg:
IMPORTER_ROCRATE_PROFILES = [
{
"id": "base",
"label": "Generic RO-Crate",
"class": "invenio_importer.importers.rocrate_profiles.base:BaseROCrateProfile",
},
{
"id": "metax",
"label": "Metax (Fairdata)",
"class": "invenio_importer.importers.rocrate_profiles.metax:MetaxROCrateProfile",
},
]
Custom profiles must extend BaseROCrateProfile from invenio_importer.importers.rocrate_profiles.base.
Permissions#
By default, any authenticated user may run an import.
To restrict access, set IMPORTER_PERMISSION_POLICY to a dotted path pointing to a custom permission policy class:
IMPORTER_PERMISSION_POLICY = "my_package.permissions:MyImporterPermissionPolicy"
The class must implement the standard Invenio permission policy interface.
Configuration reference#
| Variable | Default | Description |
|---|---|---|
IMPORTER_ENABLED |
False |
Master switch — must be True to show the importer UI |
IMPORTERS |
[] |
List of enabled importer definitions |
IMPORTER_ROCRATE_PROFILES |
(see above) | Available RO-Crate profiles |
IMPORTER_PERMISSION_POLICY |
None |
Dotted path to a custom permission policy; None allows any authenticated user |
IMPORTER_UI_LABEL |
"Import into InvenioRDM" |
Label shown on the importer index page |
Last update: 2026-11-06
Last review: 2026-11-06