The
annotation_queues client methods are generally available. The annotate_record and assign_record methods are currently in BETA ā the API may change without notice, and a one-time warning is emitted on first use.Key Capabilities
- Create and configure annotation queues with annotators and annotation configs
- Add spans, traces, sessions, or dataset examples as records for annotation
- Submit annotations and assign records to specific users
- List and delete records
List Annotation Queues
Create an Annotation Queue
Queue names must be unique within the target space (max 255 characters). At least one annotation config ID and one annotator email are required; all annotators must have active accounts with access to the space.assignment_method defaults to ALL (every annotator sees every record). Pass record_sources to populate the queue on creation (at most 2 sources and 100 session IDs in total; see Add Records for the accepted shapes).
Get an Annotation Queue
Update an Annotation Queue
Only the fields you pass are updated. At least one field must be provided, otherwise aValueError is raised. List fields (annotation_config_ids, annotator_emails) fully replace the existing values when provided; pass an empty list to clear them. Pass instructions=None to clear existing instructions (empty strings are rejected by the server).
Delete an Annotation Queue
Manage Records
Whenannotation_queue is a name, pass space so it can be resolved to an ID.
List Records
Each record includes its data as flat key-value pairs, any annotations that have been added, and the users assigned to annotate it. The server enforces an upper bound of 500 onlimit.
Add Records
Add spans, traces, sessions, or dataset examples as records for annotation. At most 2 record sources and 500 total records per request; session sources may contain at most 100 session IDs in total. Each source can be passed as a concrete record input (wrapped automatically), anAnnotationQueueRecordInput, or a plain dict matching one of the record schemas.
For span, trace, and session sources, the
start_timeāend_time range must not exceed 7 days.