Skip to main content
GET
/
sessions
Get sessions
curl --request GET \
  --url https://api.galtea.ai/sessions \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "session_123",
    "customId": "custom_session_123",
    "versionId": "ver_123",
    "userId": "user_123",
    "testCaseId": "tc_123",
    "context": {
      "value": "Session context information"
    },
    "stoppingReason": "GOAL_ACHIEVED",
    "error": "External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}",
    "status": "PENDING",
    "metadata": {
      "key": "value"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z"
  }
]

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

testCaseIds
string[]

Filter by test case IDs

sort
string[]

Sort instructions (field and direction pairs)

limit
integer

Maximum number of results

offset
integer

Number of results to skip

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
Example:

"session_123"

customId
string | null
Example:

"custom_session_123"

versionId
string
Example:

"ver_123"

userId
string | null
Example:

"user_123"

testCaseId
string | null
Example:

"tc_123"

context
object

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

Example:
{ "value": "Session context information" }
stoppingReason
string | null
Example:

"GOAL_ACHIEVED"

error
string | null
Example:

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

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

"PENDING"

metadata
object
Example:
{ "key": "value" }
createdAt
string<date-time>
deletedAt
string<date-time> | null