Skip to main content
POST
/
v2
/
projects
/
{project_id}
/
sessions
/
search
Query Sessions
curl --request POST \
  --url https://api.galileo.ai/v2/projects/{project_id}/sessions/search \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "starting_token": 0,
  "limit": 100,
  "previous_last_row_id": "<string>",
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "filters": [
    {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  ],
  "filter_tree": {
    "filter": {
      "value": "<unknown>",
      "name": "<string>",
      "column_id": "<string>",
      "operator": "eq",
      "case_sensitive": true
    }
  },
  "sort": {
    "column_id": "created_at",
    "ascending": false,
    "sort_type": "column"
  },
  "truncate_fields": false
}
'
{
  "num_records": 123,
  "starting_token": 0,
  "limit": 100,
  "paginated": false,
  "next_starting_token": 123,
  "last_row_id": "<string>",
  "records": [
    {
      "id": "<string>",
      "session_id": "<string>",
      "trace_id": "<string>",
      "project_id": "<string>",
      "run_id": "<string>",
      "type": "trace",
      "input": "",
      "redacted_input": "<string>",
      "output": "<string>",
      "redacted_output": "<string>",
      "name": "",
      "created_at": "2023-11-07T05:31:56Z",
      "user_metadata": {},
      "tags": [
        "<string>"
      ],
      "status_code": 123,
      "metrics": {
        "duration_ns": 123
      },
      "external_id": "<string>",
      "dataset_input": "<string>",
      "dataset_output": "<string>",
      "dataset_metadata": {},
      "updated_at": "2023-11-07T05:31:56Z",
      "has_children": true,
      "metrics_batch_id": "<string>",
      "session_batch_id": "<string>",
      "metric_info": {},
      "is_complete": true,
      "feedback_rating_info": {}
    }
  ]
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string<uuid4>
required

Body

application/json
starting_token
integer
default:0
limit
integer
default:100
previous_last_row_id
string<uuid4> | null
log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

filters
(LogRecordsIDFilter · object | LogRecordsDateFilter · object | LogRecordsNumberFilter · object | LogRecordsBooleanFilter · object | LogRecordsCollectionFilter · object | LogRecordsTextFilter · object)[]
filter_tree
FilterLeaf · object
sort
LogRecordsSortClause · object
truncate_fields
boolean
default:false

Response

Successful Response

num_records
integer
required

number of records

starting_token
integer
default:0
limit
integer
default:100
paginated
boolean
default:false
next_starting_token
integer | null
last_row_id
string<uuid4> | null
records
(ExtendedTraceRecord · object | ExtendedAgentSpanRecord · object | ExtendedWorkflowSpanRecord · object | ExtendedLlmSpanRecord · object | ExtendedToolSpanRecord · object | ExtendedRetrieverSpanRecord · object | ExtendedSessionRecord · object)[]

records matching the query