You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: add File entity support and RO-Crate metadata endpoint
BREAKING CHANGE: Remove /entity/{id}/file/{fileId} endpoint in favour of /entity/{id}/file
- Add http://pcdm.org/models#File entity type to support individual files
- Remove /entity/{id}/file/{fileId} endpoint (breaking change)
- Add /entity/{id}/file endpoint for accessing File entity content
- Add /entity/{id}/crate endpoint to retrieve RO-Crate JSON-LD metadata
- Add InvalidEntityTypeError schema for entity type validation
- Update documentation with File entity examples and migration guide
- Remove http://schema.org/MediaObject from EntityType enum
The new /entity/{id}/file endpoint only works with File entities and returns
a 400 error with INVALID_ENTITY_TYPE code for Collection or Object entities.
The new /entity/{id}/crate endpoint works with all entity types and returns
the complete RO-Crate metadata conforming to the RO-Crate specification.
Retrieve an individual file that is part of a given entity's RO-Crate. The file can be returned inline (e.g., displayed in the browser) or as an attachment for download (e.g., prompting a save dialog), based on the disposition.
190
-
The API can serve the file or redirect to the location of the file
191
-
operationId: getEntityOpen
189
+
Retrieve the file content for an entity of type File. The file can be returned inline (e.g., displayed in the browser) or as an attachment for download (e.g., prompting a save dialog), based on the disposition parameter.
190
+
The API can serve the file directly or redirect to the location of the file.
191
+
192
+
This endpoint only works for entities with entityType `http://pcdm.org/models#File`. For Collection or Object entities, a 400 error will be returned.
193
+
operationId: getEntityFile
192
194
parameters:
193
195
- name: id
194
196
in: path
195
197
required: true
196
-
description: The RO-Crate entity ID to which the file belongs.
Retrieve the complete RO-Crate JSON-LD metadata for an entity. This returns the raw RO-Crate representation, which includes all metadata conforming to the RO-Crate specification.
325
+
326
+
This endpoint works for any entity type (Collection, Object, or File) and returns the associated ro-crate-metadata.json content.
0 commit comments