Annotation Fields#

Annotation fields are part of the annotation template system which defines the data fields that can be used in an annotation type.

Annotation field object#

An annotation field object has the following properties:

  • id: (read only) The ID of the annotation field.

  • name: The name of the annotation field.

  • description: The description of the annotation field.

  • type_name: The type of the annotation field. The supported types are: text, long_text, link, choice, date.

  • extended_data: Additional data of the annotation field which can have the following properties:

    • valueRequired: (boolean) Whether the field is required to have a value when used in an annotation. Default is false.

    • multipleValues: (boolean) Whether the field can have multiple values when used in an annotation. Default is false.

    • allowHtml: (boolean) Whether the field allows HTML content when used in an annotation. Default is false. Only applies to long_text field types.

    • valuePattern: (string) Pipe (|) separated string which defines the allowed values for choice field types. For example, Option 1|Option 2|Option 3.

    • hideLabel: (boolean) Whether to hide the field label when displaying the annotation. Default is false.

    • hidden: (boolean) Whether to completely hide the field when displaying the annotation. Default is false. This is useful for fields specified in the title mask of an annotation type.

  • owner_id: (read only) The ID of the user who owns the annotation field. System fields have null owner ID.

Get all annotation fields#

GET /annotation-template/fields

Get all annotation fields which contain both system and user defined annotation fields.

Response#

An array of annotation field objects.

Create an annotation field#

POST /annotation-template/fields

Create a new annotation field.

Request#

The request body should be an annotation field object used to create a new annotation field. Read only properties will be ignored.

Response#

The annotation field object of the newly created annotation field.

Get an annotation field#

GET /annotation-template/fields/{id}

Get an annotation field by its ID.

URL parameters#

  • id: The ID of the annotation field.

Response#

The annotation field object of the queried annotation field.

Update an annotation field#

PUT /annotation-template/fields/{id}

Update an annotation field by its ID.

URL parameters#

  • id: The ID of the annotation field.

Request#

The request body should be an annotation field object used to update the annotation field. Read only properties will be ignored.

Response#

The annotation field object of the updated annotation field.

Delete an annotation field#

DELETE /annotation-template/fields/{id}

Delete an annotation field by its ID.

Warning

Deleting an annotation field will also delete the field data in all annotations using this field. This action is irreversible.

URL parameters#

  • id: The ID of the annotation field.

Response#

The deleted annotation field object.

Get all field types#

GET /annotation-template/field-types

Get all supported annotation field types.

Response#

An array of supported annotation field types. Each type has the following properties:

  • name: The machine name of the field type.

  • description: The description of the field type.

  • label: The human-readable label of the field type.