---
title: "Export session MLflow traces"
method: POST
path: "/api/v1/sessions/{session_id}/trace-export"
tags: ["sessions"]
---

# Export session MLflow traces

`POST /api/v1/sessions/{session_id}/trace-export`

Write full MLflow trace JSON/JSONL artifacts and a distilled GEPA evidence bundle.

## Path parameters

- `session_id` string, required — Identifier of the session whose traces to export.

## Request body

- SessionTraceExportRequest — Request body for exporting a session's linked MLflow traces.
  - `format` 'json' | 'jsonl' | 'both' — Trace artifact format to write.
  - `mlflow_session_id` string, nullable — Optional MLflow trace session id hint. The server validates the hint against authorized runtime session ids for the resolved durable session before export.

## Response `200`

Successful Response

- SessionTraceExportResponse — Trace export artifact paths for a session.
  - `ok` boolean — Whether trace export completed.
  - `session_id` string, required — Durable session identifier.
  - `trace_count` integer, required — Number of MLflow traces exported.
  - `json_path` string, nullable — Path to the full JSON trace artifact.
  - `jsonl_path` string, nullable — Path to the full JSONL trace artifact.
  - `distilled_bundle_path` string, nullable — Path to the distilled GEPA evidence bundle.
  - `skipped_trace_ids` string[] — Trace identifiers that could not be resolved/exported.
  - `errors` string[] — Non-fatal export errors.
  - `summary` object — Distilled trace export summary.

## Other responses

- `401` — Authentication is required or the provided token is invalid.
- `403` — The caller does not have permission to access this resource.
- `404` — Session not found.
- `422` — Validation Error
- `503` — Session services are unavailable because server startup is incomplete.

---

[API](https://skmtc.net/qredence/apis/fleet-rlm.md) · [All operations](https://skmtc.net/qredence/apis/fleet-rlm/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qredence/fleet-rlm/versions/62e8c152aa18/schema)
