Export Trace
Export the V1 bundle (trace + spans + git_context + manifest) for the caller's project.
Defaults to the full projection — an export is explicit intent to take the complete trace, so per-span input/output/metadata are included unless the caller narrows fields. bundle.trace equals the traces get payload at the same projection.
Rate limited on its own export bucket because it builds and serializes the full bundle.
Args: auth (DualStampedAuth): Resolved credential context (API key or user session token); scopes the read to its project and stamps the rate-limit identity. trace_id (str): Trace to export. fields (str | None): Comma-separated projection groups or an alias (skeleton/full). None selects the default full projection.
Returns: PublicTraceExportResponse: The V1 export bundle (manifest, trace, spans, git_context) at the requested projection.
Raises: HTTPException: 400 if fields is invalid, 404 if the trace is missing or outside the key's project, 500 on a reader failure.
Request
- Base URLhttps://app.traceroot.ai
- URLhttps://app.traceroot.ai/api/v1/public/traces/{trace_id}/export
- AuthHTTP bearer
Path parameters
Query parameters
Comma-separated field groups to include: 'core' (tree/timing/status, always included), 'usage' (tokens/cost), 'io' (per-span input/output), 'metadata' (per-span metadata). Aliases: 'skeleton' (core,usage), 'full' (everything). Unknown groups return 400.
Target project for the request. Required when authenticating with a user session token (a user credential is only meaningful scoped to a project); for an API key it is optional and, if given, must match the key's project.
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.