Fetch the full provenance DAG for a run
const url = 'https://example.com/v1/provenance/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/provenance/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Returns the full DAG (nodes + edges) plus record metadata: an agent turn’s record, or a flow run’s. A flow run’s record is written just after the run ends. From the run’s end until it is, the answer is 404 provenance-not-found with error.details.recordState: being-written; if writing it failed, recordState: failed and error.details.reason, a code. More states and codes may come. 404 with neither when the run has no record: a run still running, a dry run, an erased run, a run from before records were kept for it, or a deployment that doesn’t write them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”RunId — opaque branded string (a UUID).
Responses
Section titled “Responses”Full provenance record.
Full provenance record including the DAG payload.
object
object
object
object
object
object
Runtime-side signature attached at emission time (if the deployment signs on write). Independent of the export-time signature returned by the export route.
object
Base64-encoded signature bytes.
Each model call’s usage from the cost ledger, by the callId in its model-call node’s attributes. Joined when read: not part of the signed DAG. A signed export includes it, as it stood when signed.
object
object
The call’s tokens. promptTokens / completionTokens are the totals; cacheReadTokens / cacheWriteTokens are parts of promptTokens, reasoningTokens of completionTokens, present when the provider reports them.
object
A flow record’s model usage per step, by the step node’s id: the model calls of the runs the step started (an agent step’s turn, a sub-flow’s run) and of the runs they started, from the cost ledger. A folded loop node sums its iterations’. A tool step’s own model calls, made by its pack with its own key, aren’t in it. Joined when read: not part of the signed DAG. A signed export includes it, as it stood when signed.
object
object
object
Example
{ "dag": { "nodes": [ { "kind": "input" } ], "edges": [ { "kind": "caused-by" } ] }, "signature": { "algorithm": "ed25519" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No provenance record for that run under this tenant (provenance-not-found; error.details.recordState says when it is still being written, or failed).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The database was too busy to answer in time (database-busy); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}