Skip to content

Manage Annotations

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

Table of Contents

IIIF Reference: http://iiif.io/api/presentation/2.1/#image-resources

Create an Annotation

  • An annotation can be created by sending a POST request to {identifier}/annotation with the required parameters.
  • For example:
{
  "annotation": {
    "@context": "http://iiif.io/api/presentation/2/context.json",
    "@id": "http://example.org/iiif/book1/annotation/p0001-image",
    "@type": "oa:Annotation",
    "motivation": "sc:painting",
    "resource": {
      "@id": "http://example.org/iiif/book1/res/page1.jpg",
      "@type": "dctypes:Image",
      "format": "image/jpeg",
      "service": {
        "@context": "http://iiif.io/api/image/2/context.json",
        "@id": "http://example.org/images/book1-page1",
        "profile": "http://iiif.io/api/image/2/level2.json"
      },
      "height": 2000,
      "width": 1500
    },
    "on": "http://example.org/iiif/book1/canvas/p1"
  }
}
  • This would create the annotation for the identifier book1 with name p0001-image.

Update an Annotation

  • An annotation can be updated by sending a PUT request to /{identifier}/annotation/{name} with fields that need to be updated.

Delete an Annotation

  • An annotation can be deleted by sending a DELETE request to /{identifier}/annotation/{name}.

View an Annotation

  • A single annotation can be viewed at /{identifier}/annotation/{name}.

FAQ

  • How to create an annotation without an @id?
  • A POST with no @id in the request body will auto-generate a unique UUID name for that object with the provided identifier.
Clone this wiki locally