curl --request POST \
--url https://api.example.com/annotation_queues/{queue_id}/items/query \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"filter": {
"added_by": "<string>",
"annotation_states": [
"unstarted",
"in_progress"
],
"call_id": "<string>",
"call_op_name": "<string>",
"call_trace_id": "<string>",
"id": "<string>"
},
"include_position": false,
"limit": 50,
"offset": 0,
"sort_by": [
{
"field": "<string>"
}
]
}
'import requests
url = "https://api.example.com/annotation_queues/{queue_id}/items/query"
payload = {
"project_id": "<string>",
"filter": {
"added_by": "<string>",
"annotation_states": ["unstarted", "in_progress"],
"call_id": "<string>",
"call_op_name": "<string>",
"call_trace_id": "<string>",
"id": "<string>"
},
"include_position": False,
"limit": 50,
"offset": 0,
"sort_by": [{ "field": "<string>" }]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: '<string>',
filter: {
added_by: '<string>',
annotation_states: ['unstarted', 'in_progress'],
call_id: '<string>',
call_op_name: '<string>',
call_trace_id: '<string>',
id: '<string>'
},
include_position: false,
limit: 50,
offset: 0,
sort_by: [{field: '<string>'}]
})
};
fetch('https://api.example.com/annotation_queues/{queue_id}/items/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/annotation_queues/{queue_id}/items/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_id' => '<string>',
'filter' => [
'added_by' => '<string>',
'annotation_states' => [
'unstarted',
'in_progress'
],
'call_id' => '<string>',
'call_op_name' => '<string>',
'call_trace_id' => '<string>',
'id' => '<string>'
],
'include_position' => false,
'limit' => 50,
'offset' => 0,
'sort_by' => [
[
'field' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/annotation_queues/{queue_id}/items/query"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"filter\": {\n \"added_by\": \"<string>\",\n \"annotation_states\": [\n \"unstarted\",\n \"in_progress\"\n ],\n \"call_id\": \"<string>\",\n \"call_op_name\": \"<string>\",\n \"call_trace_id\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"include_position\": false,\n \"limit\": 50,\n \"offset\": 0,\n \"sort_by\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/annotation_queues/{queue_id}/items/query")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"filter\": {\n \"added_by\": \"<string>\",\n \"annotation_states\": [\n \"unstarted\",\n \"in_progress\"\n ],\n \"call_id\": \"<string>\",\n \"call_op_name\": \"<string>\",\n \"call_trace_id\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"include_position\": false,\n \"limit\": 50,\n \"offset\": 0,\n \"sort_by\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/annotation_queues/{queue_id}/items/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"<string>\",\n \"filter\": {\n \"added_by\": \"<string>\",\n \"annotation_states\": [\n \"unstarted\",\n \"in_progress\"\n ],\n \"call_id\": \"<string>\",\n \"call_op_name\": \"<string>\",\n \"call_trace_id\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"include_position\": false,\n \"limit\": 50,\n \"offset\": 0,\n \"sort_by\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"call_id": "<string>",
"call_op_name": "<string>",
"call_started_at": "2023-11-07T05:31:56Z",
"call_trace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"display_fields": [
"<string>"
],
"id": "<string>",
"project_id": "<string>",
"queue_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"added_by": "<string>",
"annotator_user_id": "<string>",
"call_ended_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"position_in_queue": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Requête des éléments de la file d'attente d'annotation
Interroger les éléments d’une file d’attente d’annotation avec pagination et tri.
curl --request POST \
--url https://api.example.com/annotation_queues/{queue_id}/items/query \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"filter": {
"added_by": "<string>",
"annotation_states": [
"unstarted",
"in_progress"
],
"call_id": "<string>",
"call_op_name": "<string>",
"call_trace_id": "<string>",
"id": "<string>"
},
"include_position": false,
"limit": 50,
"offset": 0,
"sort_by": [
{
"field": "<string>"
}
]
}
'import requests
url = "https://api.example.com/annotation_queues/{queue_id}/items/query"
payload = {
"project_id": "<string>",
"filter": {
"added_by": "<string>",
"annotation_states": ["unstarted", "in_progress"],
"call_id": "<string>",
"call_op_name": "<string>",
"call_trace_id": "<string>",
"id": "<string>"
},
"include_position": False,
"limit": 50,
"offset": 0,
"sort_by": [{ "field": "<string>" }]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: '<string>',
filter: {
added_by: '<string>',
annotation_states: ['unstarted', 'in_progress'],
call_id: '<string>',
call_op_name: '<string>',
call_trace_id: '<string>',
id: '<string>'
},
include_position: false,
limit: 50,
offset: 0,
sort_by: [{field: '<string>'}]
})
};
fetch('https://api.example.com/annotation_queues/{queue_id}/items/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/annotation_queues/{queue_id}/items/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_id' => '<string>',
'filter' => [
'added_by' => '<string>',
'annotation_states' => [
'unstarted',
'in_progress'
],
'call_id' => '<string>',
'call_op_name' => '<string>',
'call_trace_id' => '<string>',
'id' => '<string>'
],
'include_position' => false,
'limit' => 50,
'offset' => 0,
'sort_by' => [
[
'field' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/annotation_queues/{queue_id}/items/query"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"filter\": {\n \"added_by\": \"<string>\",\n \"annotation_states\": [\n \"unstarted\",\n \"in_progress\"\n ],\n \"call_id\": \"<string>\",\n \"call_op_name\": \"<string>\",\n \"call_trace_id\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"include_position\": false,\n \"limit\": 50,\n \"offset\": 0,\n \"sort_by\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/annotation_queues/{queue_id}/items/query")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"filter\": {\n \"added_by\": \"<string>\",\n \"annotation_states\": [\n \"unstarted\",\n \"in_progress\"\n ],\n \"call_id\": \"<string>\",\n \"call_op_name\": \"<string>\",\n \"call_trace_id\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"include_position\": false,\n \"limit\": 50,\n \"offset\": 0,\n \"sort_by\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/annotation_queues/{queue_id}/items/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"<string>\",\n \"filter\": {\n \"added_by\": \"<string>\",\n \"annotation_states\": [\n \"unstarted\",\n \"in_progress\"\n ],\n \"call_id\": \"<string>\",\n \"call_op_name\": \"<string>\",\n \"call_trace_id\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"include_position\": false,\n \"limit\": 50,\n \"offset\": 0,\n \"sort_by\": [\n {\n \"field\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"call_id": "<string>",
"call_op_name": "<string>",
"call_started_at": "2023-11-07T05:31:56Z",
"call_trace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"display_fields": [
"<string>"
],
"id": "<string>",
"project_id": "<string>",
"queue_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"added_by": "<string>",
"annotator_user_id": "<string>",
"call_ended_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"position_in_queue": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Autorisations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Paramètres de chemin
Corps
Corps de la requête pour interroger les éléments d’une file d'attente d'annotation (queue_id provient du chemin).
"entity/project"
Filtrer les éléments de la file d'attente par métadonnées d’appel et état d’annotation
Show child attributes
Show child attributes
Inclure le champ position_in_queue (index commençant à 1 dans la file d'attente complète)
50
0
Trier par plusieurs champs (par ex. created_at, updated_at)
Show child attributes
Show child attributes
Réponse
Réponse réussie
Réponse à l’interrogation des éléments de la file d'attente d'annotation.
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?