-
Notifications
You must be signed in to change notification settings - Fork 1
Manage Annotations
Jana Rajakumar edited this page Feb 20, 2018
·
3 revisions
IIIF Reference: http://iiif.io/api/presentation/2.1/#image-resources
- 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 namep0001-image
.
- An annotation can be updated by sending a
PUT
request to/{identifier}/annotation/{name}
with fields that need to be updated.
- An annotation can be deleted by sending a
DELETE
request to/{identifier}/annotation/{name}
.
- A single annotation can be viewed at
/{identifier}/annotation/{name}
.
- How to create an annotation without an
@id
? - A
POST
with no@id
in the request body will auto-generate a unique UUIDname
for that object with the providedidentifier
.