Skip to content

Annotations endpoints

GET /api/v1/projects/{project_id}/annotation-queues

Section titled “GET /api/v1/projects/{project_id}/annotation-queues”

List annotation queues

Newest first, each with its progress.

Parameter In Type Required Notes
project_id path string (uuid) yes
limit query integer no min 1, max 200 Default 50.
cursor query string or null no max length 512
Status Description Body
200 Successful Response application/json: Page_QueueOut_
422 Validation Error application/json: HTTPValidationError

POST /api/v1/projects/{project_id}/annotation-queues

Section titled “POST /api/v1/projects/{project_id}/annotation-queues”

Add a queue

Store an empty queue. 409 NAME_TAKEN, 422 UNKNOWN_SCORE_CONFIG.

Parameter In Type Required Notes
project_id path string (uuid) yes

Request body (application/json, required): QueueSpec

Status Description Body
201 Successful Response application/json: QueueOut
422 Validation Error application/json: HTTPValidationError

DELETE /api/v1/projects/{project_id}/annotation-queues/{queue_id}

Section titled “DELETE /api/v1/projects/{project_id}/annotation-queues/{queue_id}”

Delete a queue

Delete the queue with its items; the scores already given stay. 409 QUEUE_IN_USE while a review policy fills it.

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes
Status Description Body
204 Successful Response none
422 Validation Error application/json: HTTPValidationError

GET /api/v1/projects/{project_id}/annotation-queues/{queue_id}

Section titled “GET /api/v1/projects/{project_id}/annotation-queues/{queue_id}”

Get a queue

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes
Status Description Body
200 Successful Response application/json: QueueOut
422 Validation Error application/json: HTTPValidationError

POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/claim

Section titled “POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/claim”

Claim the next item

The lowest-id pending item that is free, already yours, or claimed over 30 minutes ago; 204 when there is none.

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes
Status Description Body
200 Successful Response application/json: QueueItemOut
204 No item is waiting none
422 Validation Error application/json: HTTPValidationError

GET /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items

Section titled “GET /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items”

List a queue’s items

By id, oldest first; status keeps one status, reason one reason.

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes
status query QueueItemStatus or null no
reason query ReviewReason or null no
limit query integer no min 1, max 200 Default 50.
cursor query string or null no max length 512
Status Description Body
200 Successful Response application/json: Page_QueueItemOut_
422 Validation Error application/json: HTTPValidationError

POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items

Section titled “POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items”

Queue traces

Queue up to 200 traces, or the given span of each. A trace already queued is skipped.

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes

Request body (application/json, required): ItemsIn

Status Description Body
200 Successful Response application/json: ItemsAddedOut
422 Validation Error application/json: HTTPValidationError

POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/complete

Section titled “POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/complete”

Complete an item

Score the item’s trace: one score for each of the queue’s configs, no others. 409 ITEM_NOT_ASSIGNED_TO_YOU, 422 SCORE_NOT_IN_QUEUE, 422 SCORE_REQUIRED.

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes
item_id path string (uuid) yes

Request body (application/json, required): Completion

Status Description Body
200 Successful Response application/json: QueueItemOut
422 Validation Error application/json: HTTPValidationError

POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/release

Section titled “POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/release”

Release an item

Give your claimed item back to the queue. 409 ITEM_NOT_ASSIGNED_TO_YOU.

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes
item_id path string (uuid) yes
Status Description Body
200 Successful Response application/json: QueueItemOut
422 Validation Error application/json: HTTPValidationError

POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/skip

Section titled “POST /api/v1/projects/{project_id}/annotation-queues/{queue_id}/items/{item_id}/skip”

Skip an item

Mark your claimed item skipped. 409 ITEM_NOT_ASSIGNED_TO_YOU.

Parameter In Type Required Notes
project_id path string (uuid) yes
queue_id path string (uuid) yes
item_id path string (uuid) yes
Status Description Body
200 Successful Response application/json: QueueItemOut
422 Validation Error application/json: HTTPValidationError