Collections#

Collection object#

Each collection returned from the API is a JSON object with the following properties:

  • id: (read only) The ID of the collection.

  • name: The name of the collection.

  • description: The description of the collection.

  • owner: (read only) The owner of the collection. The value is a user object which contains the properties of the owner.

  • metadata: list of metadata entries. It is an array of object where each object contains the name and value of the metadata.

  • publication: (read only) The publication of the collection. The value is a publication object with the following properties:

    • id: The ID of the publication.

    • collection_id: The ID of the collection of the publication.

    • active: Whether the publication is active.

    • created_at: The datetime when the publication is created.

    • updated_at: The datetime when the publication is updated.

    • persistent_url: The persistent base URL of the publication.

  • created_at: (read only) The datetime when the collection is created.

  • updated_at: (read only) The datetime when the collection is updated.

  • policies: (read only) The policies applied to the collection for the current user. The value is an array of permission names which the current user has on the collection. The permission names are:

    • access: The user can view the collection and create image sets in the collection.

    • write: The user can update the collection properties.

    • manage: The user can share the collection with other users.

    • delete: The user can delete the collection.

Get all collections#

GET /collections

Get all collections which can be accessed by the current authenticated user. The collections returned includes the collections owned by the user and the collections shared with the user.

Response#

An array of collection objects.

Create a collection#

POST /collections

Request#

The request body should be a collection object used to create a new collection. Read only properties will be ignored.

Response#

The collection object of the newly created collection.

Get a collection#

GET /collections/{id}

Get a collection by its ID.

URL parameters#

  • id: The ID of the collection.

Response#

The collection object of the queried collection.

Update a collection#

PUT /collections/{id}

Update a collection by its ID.

URL parameters#

  • id: The ID of the collection.

Request#

The request body should be a collection object used to update the collection. Read only properties will be ignored.

It also accepts a few additional properties in the collection object:

  • published: The publishing status of the collection. If it is set to true, the collection will be published. If it is set to false, the collection will be unpublished.

Response#

The collection object after the update.

Delete a collection#

DELETE /collections/{id}

Delete a collection by its ID.

URL parameters#

  • id: The ID of the collection.

Response#

The collection object of the deleted collection.