Skip to content

Auto Generate @id

Jana Rajakumar edited this page Feb 21, 2018 · 3 revisions

The API will auto-generate the @id for an object if not provided or will transform the given @id to match the recommended pattern in the IIIF spec.

The @id will be parsed and transformed to match the IIIF_BASE_URL given in the app settings.

Although these are recommended patterns from the IIIF spec, our API strictly enforces these patterns. This allows us to perform the necessary transformations in a consistent manner.

IIIF Recommended URI Patterns: http://iiif.io/api/presentation/2.1/#a-summary-of-recommended-uri-patterns

Resource URI Pattern
Collection {scheme}://{host}/{prefix}/collection/{name}
Manifest {scheme}://{host}/{prefix}/{identifier}/manifest
Sequence {scheme}://{host}/{prefix}/{identifier}/sequence/{name}
Canvas {scheme}://{host}/{prefix}/{identifier}/canvas/{name}
Annotation {scheme}://{host}/{prefix}/{identifier}/annotation/{name}
AnnotationList {scheme}://{host}/{prefix}/{identifier}/list/{name}
Range {scheme}://{host}/{prefix}/{identifier}/range/{name}
Layer {scheme}://{host}/{prefix}/{identifier}/layer/{name}
Content {scheme}://{host}/{prefix}/{identifier}/res/{name}.{format}
  • (Example):
  • An @id of http://example.org/iiif/book1/annotation/anno1 will be transformed in to http://localhost/presentation/book1/annotation/anno1 given that the value for IIIF_BASE_URL in the settings is http://localhost/presentation.
Clone this wiki locally