Canonical Tags
Unique entities described by a set of annotations
Canonical Tags are a way to reference a singular entity that is comprised of multiple fixed annotations. This is a useful abstraction when dealing with things like Airframes (Make, Model, Serial), People (First, Middle, Last), or Land (Section, Township, Range, QQ1, QQ2, etc). They are intended as a uniquely disambiguating abstraction for the multiple ways that a single entity can be expressed or written in a document.
Canonical Tags exist in two states. In their unattached state as CanonicalTag objects and as AttachedCanonicalTag object when describing a CanonicalTag that has been attached to an entire instrument or source file.
A canonical tag describes a unique entity defined by a type and an array of attributes
Attribute Name | Type | Description |
---|---|---|
typeName | String | Name describing the type of canonical tag |
attributes | Array of canonical annotations that comprise the canonical tag | |
domainEntityId? | Integer | Unique id describing the canonical tag object |
{
'typeName': 'Airframe Inventory',
'attributes': [
{'name': 'Make', 'value': 'Beech'}, {'name': 'Model', 'value': 'C24R'}, {'name': 'Serial Number', 'value': 'MC-453'}
],
}
post
https://api.annolab.ai
/v1/tag
Create a Tag
Creates a canonical tag. (Does not attach). If an identical canonical tag already exists, it does not create at duplicate.
Parameters
Header
Authorization*
Where you put your api key. Exporting a project requires a key with "Read" permissions.
{"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
Body
projectIdentifier*
String|Number
Project name or id of the project
groupName
String
Name of the group that owns the project (only required if projectIdentifer is string)
Responses
201: Created
Created (or found) CanonicalTag object
delete
https://api.annolab.ai
/v1/tag
Delete a tag
Deletes a CanonicalTag. Delete will cascade and delete all related AttachedCanonicalTag objects as well.
Parameters
Header
Authorization*
Where you put your api key. Exporting a project requires a key with "Read" permissions.
{"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
Body
projectIdentifier*
String|Integer
String of the project containing the tag or the unique identifier of the project
groupName
String
Name of the group that owns the project (only required if projectIdentifier is a string and not id)
Responses
204: No Content
An attached canonical tag object describes the attachment of a canonical tag to some Instrument or Source
Attribute Name | Type | Description |
---|---|---|
tagType | String | What the canonical tag is attached to. Can be attached to either "Instrument" or "Source" |
typeName | String | Name describing the type of canonical tag |
domainEntityId | Integer | Unique id of the canonical tag |
annotationId? | Integer | Unique id describing where the canonical tag is attached. e.g. the unique id of the instrument |
sourceReferenceId? | Integer | Unique id describing where the canonical tag is attached. e.g. the unique id of the file |
attributes | Array of canonical annotations that comprise the canonical tag | |
createdBy | UserObject|Null | Object that consists of a id, email, and username associated with the person who assigned the tag |
{
'tagType': 'Instrument',
'typeName': 'Airframe Inventory',
'domainEntityId': 39,
'annotationId': 402970,
'attributes': [
{'name': 'Make', 'value': 'Beech'}, {'name': 'Model', 'value': 'C24R'}, {'name': 'Serial Number', 'value': 'MC-453'}
],
'createdBy': {
'id': 15,
'email': "[email protected]",
'usernname': "tester"
}
}
post
https://api.annolab.ai
/v1/tag/instrument
Apply a tag to an instrument
Applies a canonical tag to an instrument.
Parameters
Header
Authorization*
Where you put your api key. Exporting a project requires a key with "Read" permissions.
{"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
Body
instrumentId*
Integer
Unique identifier for the instrument you wish to attach to
Responses
201: Created
Information about the AttachedCanonicalTag that was created
delete
https://api.annolab.ai
/v1/tag/instrument
Delete a tag from an instrument
Removes a canonical tag from being on an instrument
Parameters
Header
Authorization*
Where you put your api key. Exporting a project requires a key with "Read" permissions.
{"Authorization": "Api-Key XXXXXXX-XXXXXXX-XXXXXXX"}
Body
instrumentId*
Integer
Unique identifier for the instrument you wish to attach to
Responses
204: No Content