Annotation Types

Annotation types are the valid annotation labels that can be applied to source material.

Create Annotation Type

POST https://api.annolab.ai/v1/annotation-type/create

Create a new annotation type within your schema

Headers

Request Body

{
    "schemaName": "NER",
    "schemaId": 7,
    "key": "place-name",
    "color": "#F882FD",
    "typeId": "51",
    "name": "Place Name"
}

This code shows how to create a new annotation type

import requests

ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

annotationType = {
  'projectIdentifier': 'New NER Project',
  'category': 'NER',
  'typeName': 'Place Name' 
}

headers = {
  'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}

url = 'https://api.annolab.ai/v1/annotation-type/create'

response = requests.post(url, headers=headers, json=annotationType)

print(response.json())

Last updated