-
Notifications
You must be signed in to change notification settings - Fork 1
Manage Annotations
Jana Rajakumar edited this page Feb 20, 2018
·
3 revisions
Reference: https://iiif.library.utoronto.ca/presentation/v2/#!/Annotation/AnnotationByItemGet
IIIF Reference: http://iiif.io/api/presentation/2.1/#image-resources
- An annotation can be created by sending a
POSTrequest to{identifier}/annotationwith 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
book1with namep0001-image.
- An annotation can be updated by sending a
PUTrequest to/{identifier}/annotation/{name}with fields that need to be updated.
- An annotation can be deleted by sending a
DELETErequest to/{identifier}/annotation/{name}.
- A single annotation can be viewed at
/{identifier}/annotation/{name}.
- How to create an annotation without an
@id? - A
POSTwith no@idin the request body will auto-generate a unique UUIDnamefor that object with the providedidentifier.