πŸ”²Annotations

/getImageAnnotations/<image_id>

Get the already stored annotations for an image

GET /getImageAnnotations/<image_id>

Gets the annotations in a JSON format for Annotorious.

Query Parameters

Name
Type
Description

<id>*

String

Id of the image

Headers

Name
Type
Description

x-access-token*

String

User token

[
  {
    "type": "Annotation",
    "body": [
      {
        "value": {
          "Son": {
            "type": ["producer"],
            "volume": "0"
          },
          "Vue": {
            "sense": "Vue"
          }
        },
        "purpose": "sense"
      },
      {
        "value": "jeux de Billards",
        "purpose": "transcription",
			},
		 	"creator": {
          "id": "id_user",
          "name": "user_name"
        },
        "created": "2022-07-12T10:26:57.607Z"
      }
    ],
    "target": {
      "source": "data:image/jpeg;base64..... OU mettre URL de l'image OU nom du fichier image (unique)",
      "selector": {
        "type": "FragmentSelector",
        "conformsTo": "http://www.w3.org/TR/media-frags/",
        "value": "xywh=pixel:324,174,411,106"
      }
    },
    "@context": "http://www.w3.org/ns/anno.jsonld",
    "id": "#a39cbd17-6d53-4c7b-8500-354f0dcb9cf4"
  },
  {
    "type": "Annotation",
    "body": [
      {
        "value": {
          "Vue": {
            "sense": "Vue"
          },
          "Son": {
            "type": [
              "producer"
            ],
            "volume": "42"
          }
        },
        "purpose": "sense"
      },
      {
        "value": "vendeurs de cafΓ©",
        "purpose": "transcription"
			}
 		"creator": {
          "id": "alefi-20-20",
          "name": "Alexis"
        },
        "created": "2022-07-12T10:26:57.607Z"
      }
    ],
    "target": {
      "source": "data:image/jpeg;base64....",
      "selector": {
        	"type": "SvgSelector",
        	"value": "<svg><polygon points=\"544,12 749,111 776,27\" /></svg>"
      }
    },
    "@context": "http://www.w3.org/ns/anno.jsonld",
    "id": "#6fefe9fc-2543-40ad-9c0f-3147c7f26af0"
  }
]

/createAnnotation/<image_id>

Creates a new annotation

POST /createAnnotation/<image_id>

Creates

Query Parameters

Name
Type
Description

<id>*

String

Id of the image

Headers

Name
Type
Description

x-access-token*

String

User token

Request Body

Name
Type
Description

body*

JSON

Body of the annotation in the W3C Annotation format

zone_type*

boolean

Type of the zone (false: rectangle, true: polygon)

zone_coord*

String

Coordinates of the annotation in the image

/deleteAnnotation

triangle-exclamation

Deletes

GET /deleteAnnotation

Deletes

Headers

Name
Type
Description

x-access-token*

String

Editor user token

Request Body

Name
Type
Description

id

String

annotation_id to delete

/updateAnnotationCoord

triangle-exclamation

Update the coordinates in the image

GET /updateAnnotationCoord

Update

Query Parameters

Name
Type
Description

<id>*

String

Id of the image

Headers

Name
Type
Description

x-access-token*

String

User token

Request Body

Name
Type
Description

id*

String

annotation_id to edit

zone_coord*

String

New coordinates in the image

Last updated