curl --request GET \
--url https://api.galtea.ai/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/sessions', 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.galtea.ai/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.galtea.ai/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.galtea.ai/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "session_123",
"customId": "custom_session_123",
"versionId": "ver_123",
"userId": "user_123",
"testCaseId": "tc_123",
"context": {
"value": "Session context information"
},
"stoppingReason": "GOAL_ACHIEVED",
"recordingUri": "s3://galtea-bucket/audio/org_123/session_abc-recording.mp3",
"error": "External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}",
"status": "PENDING",
"isProduction": false,
"metadata": {
"key": "value"
},
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
]{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Get sessions
Get list of sessions with pagination and filtering. See Sessions.
curl --request GET \
--url https://api.galtea.ai/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/sessions', 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.galtea.ai/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.galtea.ai/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.galtea.ai/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "session_123",
"customId": "custom_session_123",
"versionId": "ver_123",
"userId": "user_123",
"testCaseId": "tc_123",
"context": {
"value": "Session context information"
},
"stoppingReason": "GOAL_ACHIEVED",
"recordingUri": "s3://galtea-bucket/audio/org_123/session_abc-recording.mp3",
"error": "External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}",
"status": "PENDING",
"isProduction": false,
"metadata": {
"key": "value"
},
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
]{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Authorizations
API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....
Query Parameters
Filter by session IDs
Filter by session custom IDs
Filter by product IDs
Filter by test IDs (include only). Use an empty string ("") to select sessions without a test
Omit sessions linked to the specified test IDs. Use an empty string ("") to omit sessions without a test
Filter by version IDs
Filter by monitor IDs (returns only sessions scored by the given monitors)
Filter by the specifications a session relates to. A session relates to a specification in two ways, and either one matches: it runs a test case of a test linked to that specification, or it carries an evaluation whose metric is linked to that specification. Multiple values combine as OR.
Filter by test case IDs
Filter by the session's isProduction flag. Prefer this over the legacy testIds/excludeTestIds empty-string trick.
Filter by session statuses. Multiple values combine as OR.
PENDING, COMPLETED, FAILED Filter by comment state. __any__ matches sessions with at least one comment, __none__ matches sessions with no comment, and any other value matches sessions with a comment carrying that label. All values combine as OR, so __none__ plus a label returns sessions that have no comment OR carry that label.
Sort instructions (field and direction pairs)
Maximum number of results
Number of results to skip
Filter sessions created at or after this timestamp (ISO 8601 format)
Filter sessions created at or before this timestamp (ISO 8601 format)
Response
Sessions retrieved successfully
"session_123"
"custom_session_123"
"ver_123"
"user_123"
"tc_123"
Structured context data. For plain text context, format is { value: "..." }
{ "value": "Session context information" }
"GOAL_ACHIEVED"
Canonical storage URI of the full-call recording for a telephony-evaluation session. Null for non-telephony sessions or before the recording is processed. Resolve to a playable URL via GET /storage?uri=.
"s3://galtea-bucket/audio/org_123/session_abc-recording.mp3"
"External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}"
PENDING, COMPLETED, FAILED "PENDING"
True when the session represents real production traffic (no associated test case).
false
{ "key": "value" }