Skip to main content
GET
Get sessions

Authorizations

Authorization
string
header
required

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

ids
string[]

Filter by session IDs

customIds
string[]

Filter by session custom IDs

productIds
string[]

Filter by product IDs

testIds
string[]

Filter by test IDs (include only). Use an empty string ("") to select sessions without a test

excludeTestIds
string[]

Omit sessions linked to the specified test IDs. Use an empty string ("") to omit sessions without a test

versionIds
string[]

Filter by version IDs

monitorIds
string[]

Filter by monitor IDs (returns only sessions scored by the given monitors)

monitorAlertIds
string[]

Filter by monitor alert IDs (returns only the sessions these alerts stored as bad when they opened; a session deleted since is left out). At most 10 IDs.

Maximum array length: 10
specificationIds
string[]

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.

userIds
string[]

Filter by the id of the user who launched the session. A production session has no launcher and never matches this filter. An OTel-ingested session is production unless its spans name a test case; that one records the user of the API key that sent the traces, so it does match.

runIds
string[]

Filter by the runs that CREATED the sessions. A session created outside a launch (production traffic, an imported trace) has no run and never matches. To also reach the sessions a run only scored, use involvedInRunIds.

involvedInRunIds
string[]

Filter by the runs a session relates to either way, as an OR: the run created the session, or the run scored it through one of its evaluations. This is the set a run reports as its session count.

testCaseIds
string[]

Filter by test case IDs

isProduction
boolean

Filter by the session's isProduction flag. Prefer this over the legacy testIds/excludeTestIds empty-string trick.

statuses
enum<string>[]

Filter by session statuses. Multiple values combine as OR.

Available options:
PENDING,
COMPLETED,
FAILED
commentLabels
string[]

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
string[]

Sort instructions (field and direction pairs)

limit
integer
default:10000

Maximum number of results

Required range: 0 <= x <= 9007199254740991
offset
integer
default:0

Number of results to skip

Required range: x >= 0
fromCreatedAt
string<date-time>

Filter sessions created at or after this timestamp (ISO 8601 format)

toCreatedAt
string<date-time>

Filter sessions created at or before this timestamp (ISO 8601 format)

Response

Sessions retrieved successfully

id
string
required
Example:

"session_123"

customId
string | null
required
Example:

"custom_session_123"

versionId
string
required
Example:

"ver_123"

userId
string | null
required
Example:

"user_123"

testCaseId
string | null
required
Example:

"tc_123"

context
object | null
required

Structured context data. For plain text context, format is { value: "..." }

Example:
stoppingReason
string | null
required
Example:

"GOAL_ACHIEVED"

recordingUri
string | null
required

Storage URI of the full-call recording for a telephony-evaluation session, returned under STORAGE_PUBLIC_BASE_URL when the deployment configures one. Null for non-telephony sessions or before the recording is processed. Resolve to a playable URL via GET /storage?uri=.

Example:

"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3"

error
string | null
required
Example:

"External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}"

status
enum<string>
required
Available options:
PENDING,
COMPLETED,
FAILED
Example:

"PENDING"

isProduction
boolean
required

True when the session represents real production traffic (no associated test case).

Example:

false

isSeed
boolean
required
read-only

True when the session holds the predefined conversation of a test case and is never executed. Server-managed and read-only.

Example:

false

runId
string | null
required

The run that created this session. Null for a session created outside a launch (production traffic, an imported trace). A session a run only scored names no run here; filter with involvedInRunIds to reach those too.

Example:

"run_123"

deletedAt
string<date-time> | null
required
metadata
any | null

Arbitrary metadata, returned as stored. Usually an object, but any JSON value is accepted.

Example:
createdAt
string<date-time>