---
title: "Export Records"
method: POST
path: "/projects/{project_id}/export_records"
tags: ["trace"]
---

# Export Records

`POST /projects/{project_id}/export_records`

## Path parameters

- `project_id` string, uuid4, required

## Request body

- LogRecordsExportRequest — Request schema for exporting log records (sessions, traces, spans).
  - `column_ids` string[], nullable — Column IDs to include in the export. Applies only to CSV exports.
  - `export_format` 'csv' | 'jsonl' | 'jsonl_flat'
  - `redact` boolean — Redact sensitive data
  - `file_name` string, nullable — Optional filename for the exported file
  - `export_computed_metrics_only` boolean — When true, export only enabled scorer metrics with computed values (success or roll_up). For session exports, omit entire sessions unless every enabled metric at session, trace, or span level is ready (success, roll_up, or not_applicable). Not supported with export_format=jsonl_flat (returns 422); use jsonl or csv instead.
  - `log_stream_id` string, uuid4, nullable — Log stream id associated with the traces.
  - `experiment_id` string, uuid4, nullable — Experiment id associated with the traces.
  - `metrics_testing_id` string, uuid4, nullable — Metrics testing id associated with the traces.
  - `filters` union[] — Filters to apply on the export
    - union
      - LogRecordsIDFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'one_of' | 'not_in' | 'contains'
        - `value` union, required
          - string, uuid4
          - union[]
            - union
              - …
          - string
        - `type` 'id'
      - LogRecordsDateFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte', required
        - `value` string, date-time, required
        - `type` 'date'
      - LogRecordsNumberFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'between', required
        - `value` union, required
          - integer
          - number
          - integer[]
          - number[]
        - `type` 'number'
      - LogRecordsBooleanFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne'
        - `value` boolean, required
        - `type` 'boolean'
      - LogRecordsCollectionFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'contains' | 'one_of' | 'not_in', required
        - `value` union, required
          - string
          - string[]
        - `case_sensitive` boolean
        - `type` 'collection'
      - LogRecordsTextFilter
        - `column_id` string, required — ID of the column to filter.
        - `operator` 'eq' | 'ne' | 'contains' | 'one_of' | 'not_in', required
        - `value` union, required
          - string
          - string[]
        - `case_sensitive` boolean
        - `type` 'text'
      - LogRecordsFullyAnnotatedFilter — Queue-scoped filter for records rated across all queue templates.
        - `column_id` 'fully_annotated' — Queue-scoped filter identifier. This filter only works for annotation-queue searches that provide queue context.
        - `type` 'fully_annotated'
        - `user_ids` string[], nullable — Optional queue member IDs to require for full annotation in a queue-scoped search. If omitted, all tracked queue members visible to the requester are used.
  - `sort` LogRecordsSortClause
    - `column_id` string, required — ID of the column to sort.
    - `ascending` boolean
    - `sort_type` 'column'
  - `root_type` 'session' | 'trace' | 'span', required — The root-level type of a logged step hierarchy. Maps fine-grained StepType values to the three top-level categories used throughout the platform: session, trace, and span.
  - `include_code_metric_metadata` boolean — If True, include per-row scorer metadata (the dict returned alongside the score by code-based scorers via the (score, metadata) tuple-return contract) on each MetricSuccess in the export. Off by default to keep payloads small for callers that don't need it.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-26** `05003e7835a2` — 1 info
  - the endpoint scheme security `ClassicAPIKeyHeader` was added to the API

[Change history](https://skmtc.dev/galileo/apis/galileo-api-server/changes/projects/:project_id/export_records/post.md)

---

[API](https://skmtc.dev/galileo/apis/galileo-api-server.md) · [All operations](https://skmtc.dev/galileo/apis/galileo-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/galileo/galileo-api-server/revisions/8b1d1a4a933e/schema)
