Method
getDocumentToAnnotate POST
Copy POST

Get an available document that needs to be annotated for a annotation feature group.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes featureGroupId str The ID of the feature group the annotation is on.
Yes projectId str The ID of the project that the annotation is associated with.
Yes featureName str The name of the feature the annotation is on.
No featureGroupRowIdentifier str The key value of the feature group row the annotation is on (cast to string). Usually the primary key value. If provided, fetch the immediate next (or previous) available document.
No getPrevious bool If True, get the previous document instead of the next document. Applicable if feature_group_row_identifier 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 AnnotationDocument
KEY TYPE Description
docId str The docstore Document ID of the document.
featureGroupRowIdentifier str The key value of the feature group row the annotation is on. Usually the primary key value.
featureGroupRowIndex int The index of the document row in the feature group.
totalRows int The total number of rows in the feature group.
isAnnotationPresent bool Whether the document already has an annotation. Returns None if feature group is not under annotations review mode.

Exceptions:

TYPE WHEN
DataNotFoundError

featureGroupId is not found.

DataNotFoundError

projectId is not found.

DataNotFoundError

featureGroupRowIdentifier is not found.

Language: