v3

latestOpenAPI 3.1.02026-07-311,4541,5202.3 MB
experiments

Api V 2 Experiments Logs List List

List experiment traces (root spans) using optimized CTE-based aggregation.

GET/POST /evaluations/experiments/<experiment_id>/logs/

Query params:

  • page: Page number
  • page_size: Page size (default 100)
  • sort_by: Sort field (e.g., "-cost", "-start_time", "name")
  • start_time: Filter start time
  • end_time: Filter end time
  • detail: Include span tree (1 or True)
  • export: Set to 1 or True to export results to CSV/Excel

POST body (optional):

  • filters: Advanced filter payload for complex filtering (including comparison_key filters)

Uses ExperimentTracesQueryBuilder for optimized querying:

  1. Filter by experiment_id + org first (reduces rows 99.9%)
  2. Aggregate into traces (GROUP BY trace_unique_id)
  3. Join with root spans for details
  4. Apply final filters and sort

Uses SpanTreeSerializerContextMixin to automatically handle:

  • Span tree inclusion based on ?detail=1
  • Storage enrichment based on authentication type (JWT vs API key)
  • Dynamic serializer configuration

Uses ExportingMixin to handle:

  • CSV/Excel export functionality via ?export=1
  • Async export processing with email notifications
get/api/v2/experiments/{experiment_id}/logs/list/

Path parameters

experiment_idstring required

Query parameters

pageinteger

A page number within the paginated result set.

page_sizeinteger

Number of results to return per page.

Headers

Authorizationstring required

JWT access token or Respan API key

Response

countinteger required
nextstring uri nullable
previousstring uri nullable
total_countinteger
current_filtersFilterParamDictPydantic

Pydantic model for FilterParamDict. A dictionary that maps metric names to their filter parameters.

Each key is a metric name (str), and each value can be:

  • A single MetricFilterParamPydantic (one condition)
  • A List[MetricFilterParamPydantic] (multiple conditions for same metric)
  • A FilterBundlePydantic (nested filter bundle with connector)

Note: Uses extra="allow" for dynamic metric name fields. The pydantic_extra annotation tells Pydantic what types to expect for extra fields, and generates typed additionalProperties in JSON Schema.

filters_dataPaginatedChDatasetTraceListListFiltersData