Annotation Sets#

There are two types of annotation sets in Glycerine Server: Image Annotation Sets and Standalone Annotation Sets.

Image annotation sets are annotation sets created on image sets in Glycerine Server. Each image annotation set must be attached to an image set. Annotations from an image annotation set must target to an image from its attached image set. For API of interacting with image annotation sets, see Image Annotation Sets

Standalone annotation sets in Glycerine Server are annotation sets which are not attached to image sets. Annotations from standalone annotation sets can have targets which are not limited to images from Glycerine image sets.

Annotation set object#

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

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

  • name: The name of the annotation set.

  • description: The description of the annotation set.

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

  • image_set_id: (read only) The ID of the image set which the annotation set belongs to. Only applies to image annotation sets.

  • published_at: (read only) The datetime when the annotation set is published.

  • publication_id: (read only) The publication ID of the annotation set.

  • persistent_url: (read only) The persistent URL of the annotation set publication.

  • default_vocabulary: The ID of the default vocabulary used for tagging annotations in the annotation set.

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

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

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

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

    • access: The user can view the annotation set.

    • write: The user can update the annotation set properties and create annotations.

    • manage: The user can publish the annotation set.

    • delete: The user can delete the annotation set.

Get all annotation sets#

GET /annotation-sets

Get all annotation sets of the current user.

Response#

An array of annotation set objects. This includes both image annotation sets and standalone annotation sets.

Create an annotation set#

POST /annotation-sets

Create a standalone annotation set.

Note

This endpoint only creates standalone annotation sets. To create image annotation sets, see Create an image annotation set

Request#

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

It also accepts a few additional properties in the annotation set object:

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

Response#

The annotation set object of the newly created annotation set.

Get an annotation set#

GET /annotation-sets/{id}

Get an annotation set by its ID.

URL parameters#

  • id: The ID of the annotation set.

Response#

The annotation set object of the queried annotation set.

Update an annotation set#

PUT /annotation-sets/{id}

Update an annotation set by its ID.

URL parameters#

  • id: The ID of the annotation set.

Request#

The request body should be an annotation set object used to update the annotation set. Read only properties will be ignored.

It also accepts a few additional properties in the annotation set object:

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

Response#

The annotation set object after the update.

Delete an annotation set#

DELETE /annotation-sets/{id}

Delete an annotation set by its ID.

URL parameters#

  • image_set_id: The ID of the image set.

  • id: The ID of the annotation set.

Response#

The annotation set object of the deleted annotation set.