Skip to main content
POST
/
v2
/
projects
/
{project_id}
/
export_records
Export Records
curl --request POST \
  --url https://api.galileo.ai/v2/projects/{project_id}/export_records \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "root_type": "session",
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "filters": [
    {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  ],
  "sort": {
    "column_id": "created_at",
    "ascending": false,
    "sort_type": "column"
  },
  "column_ids": [
    "<string>"
  ],
  "export_format": "jsonl",
  "redact": true,
  "file_name": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string<uuid4>
required

Body

application/json

Request schema for exporting log records (sessions, traces, spans).

root_type
enum<string>
required
Available options:
session,
trace,
span
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)[]

Filters to apply on the export

sort
LogRecordsSortClause · object

Sort clause for the export

column_ids
string[] | null

Column IDs to include in export

export_format
enum<string>
default:jsonl

Export format

Available options:
csv,
jsonl
redact
boolean
default:true

Redact sensitive data

file_name
string | null

Optional filename for the exported file

Response

Successful Response