curl --request POST \
--url https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '
{
"record_selector": {
"record_ids": [
"<string>"
],
"type": "record_ids"
},
"column_ids": [
"<string>"
],
"export_format": "jsonl",
"redact": true,
"file_name": "<string>",
"export_computed_metrics_only": false
}
'import requests
url = "https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export"
payload = {
"record_selector": {
"record_ids": ["<string>"],
"type": "record_ids"
},
"column_ids": ["<string>"],
"export_format": "jsonl",
"redact": True,
"file_name": "<string>",
"export_computed_metrics_only": False
}
headers = {
"Galileo-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Galileo-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
record_selector: {record_ids: ['<string>'], type: 'record_ids'},
column_ids: ['<string>'],
export_format: 'jsonl',
redact: true,
file_name: '<string>',
export_computed_metrics_only: false
})
};
fetch('https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export', 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.galileo.ai/v2/annotation_queues/{queue_id}/records/export",
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([
'record_selector' => [
'record_ids' => [
'<string>'
],
'type' => 'record_ids'
],
'column_ids' => [
'<string>'
],
'export_format' => 'jsonl',
'redact' => true,
'file_name' => '<string>',
'export_computed_metrics_only' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Galileo-API-Key: <api-key>"
],
]);
$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.galileo.ai/v2/annotation_queues/{queue_id}/records/export"
payload := strings.NewReader("{\n \"record_selector\": {\n \"record_ids\": [\n \"<string>\"\n ],\n \"type\": \"record_ids\"\n },\n \"column_ids\": [\n \"<string>\"\n ],\n \"export_format\": \"jsonl\",\n \"redact\": true,\n \"file_name\": \"<string>\",\n \"export_computed_metrics_only\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Galileo-API-Key", "<api-key>")
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.galileo.ai/v2/annotation_queues/{queue_id}/records/export")
.header("Galileo-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"record_selector\": {\n \"record_ids\": [\n \"<string>\"\n ],\n \"type\": \"record_ids\"\n },\n \"column_ids\": [\n \"<string>\"\n ],\n \"export_format\": \"jsonl\",\n \"redact\": true,\n \"file_name\": \"<string>\",\n \"export_computed_metrics_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Galileo-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"record_selector\": {\n \"record_ids\": [\n \"<string>\"\n ],\n \"type\": \"record_ids\"\n },\n \"column_ids\": [\n \"<string>\"\n ],\n \"export_format\": \"jsonl\",\n \"redact\": true,\n \"file_name\": \"<string>\",\n \"export_computed_metrics_only\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Export Annotation Queue Records
Export selected records from an annotation queue.
The request must specify either a list of record IDs or a filter tree to select queue records.
Permission checks:
- User must have READ permission on the annotation queue
curl --request POST \
--url https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '
{
"record_selector": {
"record_ids": [
"<string>"
],
"type": "record_ids"
},
"column_ids": [
"<string>"
],
"export_format": "jsonl",
"redact": true,
"file_name": "<string>",
"export_computed_metrics_only": false
}
'import requests
url = "https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export"
payload = {
"record_selector": {
"record_ids": ["<string>"],
"type": "record_ids"
},
"column_ids": ["<string>"],
"export_format": "jsonl",
"redact": True,
"file_name": "<string>",
"export_computed_metrics_only": False
}
headers = {
"Galileo-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Galileo-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
record_selector: {record_ids: ['<string>'], type: 'record_ids'},
column_ids: ['<string>'],
export_format: 'jsonl',
redact: true,
file_name: '<string>',
export_computed_metrics_only: false
})
};
fetch('https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export', 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.galileo.ai/v2/annotation_queues/{queue_id}/records/export",
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([
'record_selector' => [
'record_ids' => [
'<string>'
],
'type' => 'record_ids'
],
'column_ids' => [
'<string>'
],
'export_format' => 'jsonl',
'redact' => true,
'file_name' => '<string>',
'export_computed_metrics_only' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Galileo-API-Key: <api-key>"
],
]);
$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.galileo.ai/v2/annotation_queues/{queue_id}/records/export"
payload := strings.NewReader("{\n \"record_selector\": {\n \"record_ids\": [\n \"<string>\"\n ],\n \"type\": \"record_ids\"\n },\n \"column_ids\": [\n \"<string>\"\n ],\n \"export_format\": \"jsonl\",\n \"redact\": true,\n \"file_name\": \"<string>\",\n \"export_computed_metrics_only\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Galileo-API-Key", "<api-key>")
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.galileo.ai/v2/annotation_queues/{queue_id}/records/export")
.header("Galileo-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"record_selector\": {\n \"record_ids\": [\n \"<string>\"\n ],\n \"type\": \"record_ids\"\n },\n \"column_ids\": [\n \"<string>\"\n ],\n \"export_format\": \"jsonl\",\n \"redact\": true,\n \"file_name\": \"<string>\",\n \"export_computed_metrics_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/annotation_queues/{queue_id}/records/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Galileo-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"record_selector\": {\n \"record_ids\": [\n \"<string>\"\n ],\n \"type\": \"record_ids\"\n },\n \"column_ids\": [\n \"<string>\"\n ],\n \"export_format\": \"jsonl\",\n \"redact\": true,\n \"file_name\": \"<string>\",\n \"export_computed_metrics_only\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
Request to export selected annotation queue records.
Selector to specify which queue records to export (either by record IDs or filter tree)
- AnnotationQueueRecordsByRecordIDs
- AnnotationQueueRecordsByFilterTree
Show child attributes
Show child attributes
Column IDs to include in the export. Applies only to CSV exports.
Export format
csv, jsonl, jsonl_flat Redact sensitive data
Optional filename for the exported file
When true, export only enabled scorer metrics with computed values (success or roll_up). For session exports, omit entire sessions unless every enabled metric at session, trace, or span level is ready (success, roll_up, or not_applicable). Not supported with export_format=jsonl_flat (returns 422); use jsonl or csv instead.
Response
Successful Response
Was this page helpful?