Annotation queues
Add items to an annotation queue
Adds explicit targets (each checked like a score target: a foreign or missing one is a 404 and nothing is added) or the targets of matching scores (from_scores). A thread target pins its revision to the thread’s latest request. Targets already in the queue are counted, not added again. A queue holds at most 10,000 open items.
POST
/
v1
/
annotation-queues
/
{id_or_name}
/
items
Add items to an annotation queue
curl --request POST \
--url https://api.veri.studio/v1/annotation-queues/{id_or_name}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targets": [
{
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
],
"from_scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": true,
"min": 123,
"max": 123,
"deployment_id": "<string>",
"experiment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"limit": 123
}
}
'import requests
url = "https://api.veri.studio/v1/annotation-queues/{id_or_name}/items"
payload = {
"targets": [
{
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
],
"from_scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": True,
"min": 123,
"max": 123,
"deployment_id": "<string>",
"experiment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"limit": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targets: [
{
request_id: '<string>',
deployment_id: '<string>',
thread_id: '<string>',
target_revision: '<string>',
experiment_id: '<string>',
item_id: '<string>'
}
],
from_scores: {
evaluator: '<string>',
evaluator_version: 123,
passed: true,
min: 123,
max: 123,
deployment_id: '<string>',
experiment_id: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
limit: 123
}
})
};
fetch('https://api.veri.studio/v1/annotation-queues/{id_or_name}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"added": 123,
"already_present": 123,
"skipped": 123,
"counts": {
"pending": 123,
"reserved": 123,
"completed": 123,
"skipped": 123
}
}Authorizations
API key with the vk_ prefix. Create one from the dashboard.
Path Parameters
Queue id (aq_...) or name
Body
application/json
Response
Added and already-present counts
Always "annotation_item_batch".
Targets already in the queue (or repeated in the request).
from_scores only: matching targets that no longer resolve (e.g. a purged request) or don't fit the queue's evaluators.
The queue's counts after the add.
Show child attributes
Show child attributes
Add items to an annotation queue
curl --request POST \
--url https://api.veri.studio/v1/annotation-queues/{id_or_name}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targets": [
{
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
],
"from_scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": true,
"min": 123,
"max": 123,
"deployment_id": "<string>",
"experiment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"limit": 123
}
}
'import requests
url = "https://api.veri.studio/v1/annotation-queues/{id_or_name}/items"
payload = {
"targets": [
{
"request_id": "<string>",
"deployment_id": "<string>",
"thread_id": "<string>",
"target_revision": "<string>",
"experiment_id": "<string>",
"item_id": "<string>"
}
],
"from_scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": True,
"min": 123,
"max": 123,
"deployment_id": "<string>",
"experiment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"limit": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targets: [
{
request_id: '<string>',
deployment_id: '<string>',
thread_id: '<string>',
target_revision: '<string>',
experiment_id: '<string>',
item_id: '<string>'
}
],
from_scores: {
evaluator: '<string>',
evaluator_version: 123,
passed: true,
min: 123,
max: 123,
deployment_id: '<string>',
experiment_id: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
limit: 123
}
})
};
fetch('https://api.veri.studio/v1/annotation-queues/{id_or_name}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"added": 123,
"already_present": 123,
"skipped": 123,
"counts": {
"pending": 123,
"reserved": 123,
"completed": 123,
"skipped": 123
}
}
