> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Records



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/projects/{project_id}/export_records
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/projects/{project_id}/export_records:
    post:
      tags:
        - trace
      summary: Export Records
      operationId: export_records_v2_projects__project_id__export_records_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogRecordsExportRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    LogRecordsExportRequest:
      properties:
        column_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Column Ids
          description: Column IDs to include in the export. Applies only to CSV exports.
        export_format:
          $ref: '#/components/schemas/LLMExportFormat'
          description: Export format
          default: jsonl
        redact:
          type: boolean
          title: Redact
          description: Redact sensitive data
          default: true
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
          description: Optional filename for the exported file
        log_stream_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Log Stream Id
          description: Log stream id associated with the traces.
        experiment_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Experiment Id
          description: Experiment id associated with the traces.
        metrics_testing_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Testing Id
          description: Metrics testing id associated with the traces.
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/LogRecordsIDFilter'
              - $ref: '#/components/schemas/LogRecordsDateFilter'
              - $ref: '#/components/schemas/LogRecordsNumberFilter'
              - $ref: '#/components/schemas/LogRecordsBooleanFilter'
              - $ref: '#/components/schemas/LogRecordsCollectionFilter'
              - $ref: '#/components/schemas/LogRecordsTextFilter'
              - $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
            discriminator:
              propertyName: type
              mapping:
                boolean:
                  $ref: '#/components/schemas/LogRecordsBooleanFilter'
                collection:
                  $ref: '#/components/schemas/LogRecordsCollectionFilter'
                date:
                  $ref: '#/components/schemas/LogRecordsDateFilter'
                fully_annotated:
                  $ref: '#/components/schemas/LogRecordsFullyAnnotatedFilter'
                id:
                  $ref: '#/components/schemas/LogRecordsIDFilter'
                number:
                  $ref: '#/components/schemas/LogRecordsNumberFilter'
                text:
                  $ref: '#/components/schemas/LogRecordsTextFilter'
          type: array
          title: Filters
          description: Filters to apply on the export
        sort:
          anyOf:
            - $ref: '#/components/schemas/LogRecordsSortClause'
            - type: 'null'
          description: >-
            Sort clause for the export.  Defaults to native sort (created_at, id
            descending).
        root_type:
          $ref: '#/components/schemas/RootType'
      type: object
      required:
        - root_type
      title: LogRecordsExportRequest
      description: Request schema for exporting log records (sessions, traces, spans).
      examples:
        - column_ids:
            - input
            - output
            - created_at
          export_format: jsonl
          filters:
            - case_sensitive: true
              name: input
              operator: eq
              type: text
              value: example input
          log_stream_id: 00000000-0000-0000-0000-000000000000
          root_type: trace
          sort:
            ascending: false
            name: created_at
            sort_type: column
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LLMExportFormat:
      type: string
      enum:
        - csv
        - jsonl
      title: LLMExportFormat
    LogRecordsIDFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - one_of
            - not_in
            - contains
          title: Operator
          default: eq
        value:
          anyOf:
            - type: string
              format: uuid4
            - items:
                anyOf:
                  - type: string
                    format: uuid4
                  - type: string
              type: array
            - type: string
          title: Value
        type:
          type: string
          const: id
          title: Type
          default: id
      type: object
      required:
        - column_id
        - value
      title: LogRecordsIDFilter
    LogRecordsDateFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
          title: Operator
        value:
          type: string
          format: date-time
          title: Value
        type:
          type: string
          const: date
          title: Type
          default: date
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsDateFilter
    LogRecordsNumberFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
        type:
          type: string
          const: number
          title: Type
          default: number
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsNumberFilter
    LogRecordsBooleanFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
          title: Operator
          default: eq
        value:
          type: boolean
          title: Value
        type:
          type: string
          const: boolean
          title: Type
          default: boolean
      type: object
      required:
        - column_id
        - value
      title: LogRecordsBooleanFilter
    LogRecordsCollectionFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - contains
            - one_of
            - not_in
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: true
        type:
          type: string
          const: collection
          title: Type
          default: collection
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsCollectionFilter
    LogRecordsTextFilter:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to filter.
        operator:
          type: string
          enum:
            - eq
            - ne
            - contains
            - one_of
            - not_in
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: true
        type:
          type: string
          const: text
          title: Type
          default: text
      type: object
      required:
        - column_id
        - operator
        - value
      title: LogRecordsTextFilter
    LogRecordsFullyAnnotatedFilter:
      properties:
        column_id:
          type: string
          const: fully_annotated
          title: Column Id
          description: >-
            Queue-scoped filter identifier. This filter only works for
            annotation-queue searches that provide queue context.
          default: fully_annotated
        type:
          type: string
          const: fully_annotated
          title: Type
          default: fully_annotated
        user_ids:
          anyOf:
            - items:
                type: string
                format: uuid4
              type: array
              minItems: 1
            - type: 'null'
          title: User Ids
          description: >-
            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.
      type: object
      title: LogRecordsFullyAnnotatedFilter
      description: Queue-scoped filter for records rated across all queue templates.
    LogRecordsSortClause:
      properties:
        column_id:
          type: string
          title: Column Id
          description: ID of the column to sort.
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      required:
        - column_id
      title: LogRecordsSortClause
    RootType:
      type: string
      enum:
        - session
        - trace
        - span
      title: RootType
      description: |-
        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.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````