Images#
Image object#
Each image returned from the API is a JSON object with the following properties:
id: (read only) The ID of the image.name: The name of the image.description: The description of the image.uri: (read only) The URI of the image. If the image is hosted internally be the IAW Image Server, the URI is under a custom schemeimage-server://. Otherwise, the URI is the base URL of the IIIF image.type: The type of the image. Can beiiiforimagefor plain images.source: The source of the image.image_set_id: (read only) The ID of the image set which the image belongs to. It could benullif the image is not in any image set.mime_type: (read only) The MIME type of the plain image.width: (read only) The width (in pixels) of the image.height: (read only) The height (in pixels) of the image.api_version: (read only) The IIIF Image API version of the image. e.g. v2, v3. Doesn’t apply to plain images.iiif_url: (read only) The base URL of the IIIF image.persistent_url: The persistent base URL of the image.weight: The weight of the image in the image set. This should be an integer number start from 0 which sets the order of the image in the image set (ascending order).metadata: list of metadata entries. It is an array of object where each object contains thenameandvalueof the metadata.created_at: (read only) The datetime when the image is created.updated_at: (read only) The datetime when the image is updated.
Get all images#
GET image-sets/{image_set_id}/images
Get all images in an image set.
URL parameters#
image_set_id: The ID of the image set.
Response#
An array of image objects.
Create from a local image#
POST /images/local
Create an image from a local image file.
Note
This API only creates an isolated image. To add the image to an image set, use the image set API.
Request#
The request body should be an image object used to create a new image. Read only properties will be ignored.
To specify the image file, set the content of the image file encoded in base64 to the file property of the image
object.
Response#
The image object of the newly created image.
Create from a remote image#
POST /images/remote
Create an image from a remote image file.
Note
This API only creates an isolated image. To add the image to an image set, use the image set API.
Request#
The request body should be an image object used to create a new image. Read only properties will be ignored.
To specify the image file, set the URL of the remote image file to the file property of the image object.
It also accepts a few additional properties in the image object:
convertToIIIF: Whether to convert the image to an IIIF image. If it is set totrue, the image will be converted to an IIIF image in the image server. If it is set tofalse, the image will be used as it is.
Response#
The image object of the newly created image.
Create from an external IIIF image#
POST /images/iiif
Create an image from an external IIIF image.
Note
This API only creates an isolated image. To add the image to an image set, use the image set API.
Request#
The request body should be an image object used to create a new image. Read only properties will be ignored.
To specify the IIIF image, set the base URL of the IIIF image to the file property of the image object.
Response#
The image object of the newly created image.
Get an image#
GET /images/{id}
Get an image by its ID.
URL parameters#
id: The ID of the image.
Response#
The image object of the queried image.
Update an image#
PUT /images/{id}
Update an image by its ID.
URL parameters#
id: The ID of the image.
Request#
The request body should be an image object used to update the image. Read only properties will be ignored.
Response#
The image object after the update.
Delete an image#
DELETE /images/{id}
Delete an image by its ID.
URL parameters#
id: The ID of the image.
Response#
The image object of the deleted image.