Traces

Get Trace

Get a single trace for the caller's project.

Defaults to the lightweight skeleton projection (no per-span I/O); pass fields=full (or fields=io,metadata) for per-span input/output/metadata.

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 fetch. fields (str | None): Comma-separated projection groups (e.g. io, metadata) or an alias (skeleton/full). None selects the default skeleton projection.

Returns: PublicTraceDetailResponse: The trace with span skeletons, plus per-span I/O when the projection requests it.

Raises: HTTPException: 400 if fields is invalid, 404 if the trace is missing or outside the key's project, 500 on a reader failure.

get/api/v1/public/traces/{trace_id}

Request

  • Base URL
    https://app.traceroot.ai
  • URL
    https://app.traceroot.ai/api/v1/public/traces/{trace_id}
  • Auth
    HTTP bearer

Path parameters

trace_idstring required

Query parameters

fieldsstring nullable

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.

project_idstring nullable

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

git_refstring nullable required
git_repostring nullable required
inputstring nullable required
metadatastring nullable required
namestring required
outputstring nullable required
project_idstring required
session_idstring nullable required
trace_idstring required
trace_start_timestring date-time required
trace_urlstring required
user_idstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.