Method
addAnnotation POST
Copy POST

Add an annotation entry to the database.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes annotation dict The annotation to add. Format of the annotation is determined by its annotation type.
Yes featureGroupId str The ID of the feature group the annotation is on.
Yes featureName str The name of the feature the annotation is on.
No docId str The ID of the primary document the annotation is on. At least one of the doc_id or feature_group_row_identifier must be provided in order to identify the correct annotation.
No featureGroupRowIdentifier str The key value of the feature group row the annotation is on (cast to string). Usually the feature group's primary / identifier key value. At least one of the doc_id or feature_group_row_identifier must be provided in order to identify the correct annotation.
No annotationSource str Indicator of whether the annotation came from the UI, bulk upload, etc.
No status str The status of the annotation. Can be one of 'todo', 'in_progress', 'done'. This is optional.
No comments dict Comments for the annotation. This is a dictionary of feature name to the corresponding comment. This is optional.
No projectId str The ID of the project that the annotation is associated with. This is optional.
No saveMetadata bool Whether to save the metadata for the annotation. This is optional.
No pages list pages (list): List of page numbers to consider while processing the annotation. This is optional. doc_id must be provided if pages is provided.
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.

Response:

KEY TYPE DESCRIPTION
success Boolean true if the call succeeded, false if there was an error
result AnnotationEntry
KEY TYPE Description
featureGroupId str The ID of the feature group this annotation belongs to.
featureName str name of the feature this annotation is on.
docId str The ID of the primary document the annotation is on.
featureGroupRowIdentifier str The key value of the feature group row the annotation is on (cast to string). Usually the primary key value.
updatedAt str Most recent time the annotation entry was modified, e.g. creation or update time.
annotationEntryMarker str The entry marker for the annotation.
status str The status of labeling the document.
lockedUntil str The time until which the document is locked for editing, in ISO-8601 format.
verificationInfo dict The verification info for the annotation.
annotation Annotation json-compatible structure holding the type and value of the annotation.
KEY TYPE Description
annotationType str A name determining the type of annotation and how to interpret the annotation value data, e.g. as a label, bounding box, etc.
annotationValue dict JSON-compatible value of the annotation. The format of the value is determined by the annotation type.
comments dict Comments about the annotation. This is a dictionary of feature name to the corresponding comment.
metadata dict Metadata about the annotation.

Exceptions:

TYPE WHEN
DataNotFoundError

featureGroupId is not found.

DataNotFoundError

docId is not found.

DataNotFoundError

featureGroupRowIdentifier is not found.

DataNotFoundError

projectId is not found.

Language: