> ## Documentation Index
> Fetch the complete documentation index at: https://agent-observability-docs.splunk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# annotation_queues

## AnnotationField

Represents an annotation field in an annotation queue.

## AnnotationQueueUser

Represents a user with access to an annotation queue.

## AnnotationQueue

Represents an annotation queue in the Splunk AO platform.

Annotation queues are organization-level resources used to assign log records
to annotators and track annotation progress.

## AnnotationQueues

### add\_records

```python theme={null}
def add_records(self,
                queue_id: str,
                *,
                project_id: str,
                agent_stream_id: str | None=None,
                experiment_id: str | None=None,
                record_ids: builtins.list[str] | None=None,
                record_selector: AnnotationQueueRecordSelector | None=None) -> int
```

Add records to an annotation queue.

Exactly one of `record_ids` or `record_selector` must be provided.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `project_id` (`str`): The ID of the project containing the records.
* `agent_stream_id` (`str | None`): The ID of the log stream containing the records.
* `experiment_id` (`str | None`): The ID of the experiment containing the records.
* `record_ids` (`list[str] | None`): Optional list of record IDs to add.
* `record_selector` (`AnnotationQueueRecordSelector | None`): Optional generated selector for adding records by record IDs or filter tree.

**Returns**

* `int`: The number of records added to the queue.

### create

```python theme={null}
def create(self,
           name: str,
           description: str | None=None,
           annotator_emails: builtins.list[str] | None=None,
           copy_fields_from_queue_id: str | None=None) -> AnnotationQueue
```

Create an annotation queue.

**Arguments**

* `name` (`str`): The name of the annotation queue.
* `description` (`str | None`): Optional annotation queue description.
* `annotator_emails` (`list[str] | None`): Optional annotator emails to invite or assign.
* `copy_fields_from_queue_id` (`str | None`): Optional annotation queue ID to copy fields from.

**Returns**

* `AnnotationQueue`: The created annotation queue.

### create\_field

```python theme={null}
def create_field(self,
                 queue_id: str,
                 *,
                 name: str,
                 constraints: AnnotationFieldConstraints,
                 include_explanation: bool=False,
                 criteria: str | None | Unset=UNSET) -> AnnotationField
```

Create a field in an annotation queue.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `name` (`str`): The name of the annotation field.
* `constraints` (`AnnotationFieldConstraints`): The annotation field constraints.
* `include_explanation` (`bool`): Whether annotators should include explanations.
* `criteria` (`str | None | Unset`): Optional annotation criteria. Pass None to clear it; omit to leave unset.

**Returns**

* `AnnotationField`: The created annotation field.

### delete

```python theme={null}
def delete(self, *, id: str | None=None, name: str | None=None) -> None
```

Delete an annotation queue by id or name.

**Arguments**

* `id` (`str`): The ID of the annotation queue.
* `name` (`str`): The name of the annotation queue.

### delete\_field

```python theme={null}
def delete_field(self, queue_id: str, field_id: str) -> None
```

Delete a field from an annotation queue.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `field_id` (`str`): The ID of the annotation field.

### get

```python theme={null}
def get(self,
        *,
        id: str | None=None,
        name: str | None=None) -> AnnotationQueue | None
```

Retrieves an annotation queue by id or name.

Exactly one of `id` or `name` must be provided.

**Arguments**

* `id` (`str`): The id of the annotation queue.
* `name` (`str`): The name of the annotation queue.

**Returns**

* `AnnotationQueue | None`: The annotation queue, or None if the API returns no matching queue.

### get\_records

```python theme={null}
def get_records(self,
                queue_id: str,
                *,
                starting_token: Unset | int=0,
                limit: Unset | int=100,
                previous_last_row_id: None | Unset | str=UNSET,
                filter_tree: AnnotationQueueRecordsFilter | None | Unset=UNSET,
                sort: LogRecordsSortClause | None | Unset=UNSET) -> LogRecordsPartialQueryResponse
```

Get records from an annotation queue.

This uses the queue-scoped partial search endpoint.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `starting_token` (`Union[Unset, int]`): The page starting token. Default is 0.
* `limit` (`Union[Unset, int]`): The maximum number of records to return. Default is 100.
* `previous_last_row_id` (`Union[None, Unset, str]`): Cursor value from the previous page.
* `filter_tree` (`Union[AnnotationQueueRecordsFilter, None, Unset]`): Optional filter tree to apply to queue records.
* `sort` (`Union[LogRecordsSortClause, None, Unset]`): Optional sort clause.

**Returns**

* `LogRecordsPartialQueryResponse`: The matching records and pagination metadata.

### list

```python theme={null}
def list(self, limit: Unset | int=100) -> list[AnnotationQueue]
```

List annotation queues.

**Arguments**

* `limit` (`Union[Unset, int]`): The maximum number of annotation queues to request per page. Default is 100.

**Returns**

* `list[AnnotationQueue]`: A list of annotation queues.

### list\_fields

```python theme={null}
def list_fields(self, queue_id: str) -> builtins.list[AnnotationField]
```

List fields for an annotation queue.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.

**Returns**

* `list[AnnotationField]`: A list of annotation fields.

### list\_users

```python theme={null}
def list_users(self, queue_id: str) -> builtins.list[AnnotationQueueUser]
```

List users who have access to an annotation queue.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.

**Returns**

* `list[AnnotationQueueUser]`: A list of annotation queue users.

### remove\_records

```python theme={null}
def remove_records(self,
                   queue_id: str,
                   *,
                   record_ids: builtins.list[str] | None=None,
                   record_selector: AnnotationQueueRecordSelector | None=None) -> int
```

Remove records from an annotation queue.

Exactly one of `record_ids` or `record_selector` must be provided.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `record_ids` (`list[str] | None`): Optional list of record IDs to remove.
* `record_selector` (`AnnotationQueueRecordSelector | None`): Optional generated selector for removing records by record IDs or filter tree.

**Returns**

* `int`: The number of records removed from the queue.

### remove\_user

```python theme={null}
def remove_user(self, queue_id: str, user_id: str) -> None
```

Remove a user's access to an annotation queue.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `user_id` (`str`): The ID of the user to remove.

### share

```python theme={null}
def share(self,
          queue_id: str,
          *,
          user_id: str | None=None,
          user_email: str | None=None,
          role: CollaboratorRole=CollaboratorRole.ANNOTATOR,
          track_progress: bool=True) -> AnnotationQueueUser
```

Share an annotation queue with a user.

Exactly one of `user_id` or `user_email` must be provided.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `user_id` (`str | None`): The ID of the user to share with.
* `user_email` (`str | None`): The email of the user to share with.
* `role` (`CollaboratorRole`): The role to grant. Default is CollaboratorRole.ANNOTATOR.
* `track_progress` (`bool`): Whether to track annotation progress for the user.

**Returns**

* `AnnotationQueueUser`: The created annotation queue user.

### update

```python theme={null}
def update(self,
           id: str,
           *,
           name: str | None=None,
           description: str | None | Unset=UNSET) -> AnnotationQueue
```

Update an annotation queue.

**Arguments**

* `id` (`str`): The ID of the annotation queue.
* `name` (`str | None`): Optional new queue name. Omit to leave unchanged.
* `description` (`str | None | Unset`): Optional new description. Pass None to clear it; omit to leave unchanged.

**Returns**

* `AnnotationQueue`: The updated annotation queue.

### update\_field

```python theme={null}
def update_field(self,
                 queue_id: str,
                 field_id: str,
                 *,
                 name: str,
                 criteria: str | None) -> AnnotationField
```

Update a field in an annotation queue.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `field_id` (`str`): The ID of the annotation field.
* `name` (`str`): The new name for the annotation field.
* `criteria` (`str | None`): The new criteria for the annotation field.

**Returns**

* `AnnotationField`: The updated annotation field.

### update\_user

```python theme={null}
def update_user(self,
                queue_id: str,
                user_id: str,
                *,
                role: CollaboratorRole,
                track_progress: bool | None | Unset=UNSET) -> AnnotationQueueUser
```

Update a user's role for an annotation queue.

**Arguments**

* `queue_id` (`str`): The ID of the annotation queue.
* `user_id` (`str`): The ID of the user.
* `role` (`CollaboratorRole`): The new role for the user.
* `track_progress` (`bool | None | Unset`): Optional progress tracking value.

**Returns**

* `AnnotationQueueUser`: The updated annotation queue user.

## add\_records\_to\_annotation\_queue

```python theme={null}
def add_records_to_annotation_queue(queue_id: str,
                                    *,
                                    project_id: str,
                                    agent_stream_id: str | None=None,
                                    experiment_id: str | None=None,
                                    record_ids: list[str] | None=None,
                                    record_selector: AnnotationQueueRecordSelector | None=None) -> int
```

Add records to an annotation queue.

## create\_annotation\_queue

```python theme={null}
def create_annotation_queue(name: str,
                            description: str | None=None,
                            annotator_emails: list[str] | None=None,
                            copy_fields_from_queue_id: str | None=None) -> AnnotationQueue
```

Create an annotation queue.

## create\_annotation\_queue\_field

```python theme={null}
def create_annotation_queue_field(queue_id: str,
                                  *,
                                  name: str,
                                  constraints: AnnotationFieldConstraints,
                                  include_explanation: bool=False,
                                  criteria: str | None | Unset=UNSET) -> AnnotationField
```

Create a field in an annotation queue.

## delete\_annotation\_queue

```python theme={null}
def delete_annotation_queue(*, id: str | None=None, name: str | None=None) -> None
```

Delete an annotation queue by id or name.

## delete\_annotation\_queue\_field

```python theme={null}
def delete_annotation_queue_field(queue_id: str, field_id: str) -> None
```

Delete a field from an annotation queue.

## get\_annotation\_queue

```python theme={null}
def get_annotation_queue(*,
                         id: str | None=None,
                         name: str | None=None) -> AnnotationQueue | None
```

Retrieve an annotation queue by id or name.

## get\_annotation\_queue\_records

```python theme={null}
def get_annotation_queue_records(queue_id: str,
                                 *,
                                 starting_token: Unset | int=0,
                                 limit: Unset | int=100,
                                 previous_last_row_id: None | Unset | str=UNSET,
                                 filter_tree: AnnotationQueueRecordsFilter | None | Unset=UNSET,
                                 sort: LogRecordsSortClause | None | Unset=UNSET) -> LogRecordsPartialQueryResponse
```

Get records from an annotation queue.

## list\_annotation\_queue\_fields

```python theme={null}
def list_annotation_queue_fields(queue_id: str) -> list[AnnotationField]
```

List fields for an annotation queue.

## list\_annotation\_queue\_users

```python theme={null}
def list_annotation_queue_users(queue_id: str) -> list[AnnotationQueueUser]
```

List users who have access to an annotation queue.

## list\_annotation\_queues

```python theme={null}
def list_annotation_queues(limit: Unset | int=100) -> list[AnnotationQueue]
```

List annotation queues.

## remove\_annotation\_queue\_user

```python theme={null}
def remove_annotation_queue_user(queue_id: str, user_id: str) -> None
```

Remove a user's access to an annotation queue.

## remove\_records\_from\_annotation\_queue

```python theme={null}
def remove_records_from_annotation_queue(queue_id: str,
                                         *,
                                         record_ids: list[str] | None=None,
                                         record_selector: AnnotationQueueRecordSelector | None=None) -> int
```

Remove records from an annotation queue.

## share\_annotation\_queue

```python theme={null}
def share_annotation_queue(queue_id: str,
                           *,
                           user_id: str | None=None,
                           user_email: str | None=None,
                           role: CollaboratorRole=CollaboratorRole.ANNOTATOR,
                           track_progress: bool=True) -> AnnotationQueueUser
```

Share an annotation queue with a user.

## update\_annotation\_queue

```python theme={null}
def update_annotation_queue(id: str,
                            *,
                            name: str | None=None,
                            description: str | None | Unset=UNSET) -> AnnotationQueue
```

Update an annotation queue.

## update\_annotation\_queue\_field

```python theme={null}
def update_annotation_queue_field(queue_id: str,
                                  field_id: str,
                                  *,
                                  name: str,
                                  criteria: str | None) -> AnnotationField
```

Update a field in an annotation queue.

## update\_annotation\_queue\_user

```python theme={null}
def update_annotation_queue_user(queue_id: str,
                                 user_id: str,
                                 *,
                                 role: CollaboratorRole,
                                 track_progress: bool | None | Unset=UNSET) -> AnnotationQueueUser
```

Update a user's role for an annotation queue.
