Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Get a run with its span tree

GET/api/v2/runs/{runId}
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Path parameters
runIdstringrequired

Public run id (run_xxx).

Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Responses
200

A run with its span tree.

successbooleanrequired
Allowed:true
dataRunWithSpansrequired
Show properties
idstringrequired

Public run id (run_xxx).

agentIdstring | null
agentVersionstring | null
environmentIdstring<uuid>required
namestring | nullrequired
statusstringrequired
Allowed:runningsucceededfailedcancelled
userIdstring | null
applicationstring | null
inputany | null
outputany | null
errorobject | null
tokensinteger | null
costnumber | null
tagsstring[] | null
metadataobject | null
startedAtstring<date-time>required
endedAtstring<date-time> | null
durationMsinteger | null
spansSpanNode[]required
Show properties
Array of SpanNode
idstringrequired

Public span id (span_xxx).

parentIdstring | nullrequired

Parent span id, or null for a root span.

namestringrequired
typeSpanTyperequired
Allowed:model_callcontext_assemblysession_readsession_writememory_recallmemory_writetool_callaction_callapproval_waitapproval_decisionworkflow_stepqueue_deliveryevent_deliverycustom
statusstringrequired
Allowed:runningsucceededfailed
startedAtstring<date-time>required
endedAtstring<date-time> | null
durationMsinteger | null
modelstring | null
providerstring | null
tokensobject | null
costnumber | null
inputany | null
outputany | null
errorobject | null
attributesobject | null

OTel-style attributes, including correlation refs (e.g. messageId).

childrenSpanNode[]required
Show properties
Array of SpanNode
Circular reference to SpanNode.
400

Bad Request - Invalid input data

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
404

Not Found - Resource does not exist

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.anlyon.com/api/v2/runs/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "success": true,
  "data": {
    "id": "string",
    "agentId": "string",
    "agentVersion": "string",
    "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563",
    "name": "string",
    "status": "running",
    "userId": "string",
    "application": "string",
    "input": null,
    "output": null,
    "error": {},
    "tokens": 0,
    "cost": 0,
    "tags": [
      "string"
    ],
    "metadata": {},
    "startedAt": "2019-08-24T14:15:22Z",
    "endedAt": "2019-08-24T14:15:22Z",
    "durationMs": 0,
    "spans": [
      {
        "id": "string",
        "parentId": "string",
        "name": "string",
        "type": "model_call",
        "status": "running",
        "startedAt": "2019-08-24T14:15:22Z",
        "endedAt": "2019-08-24T14:15:22Z",
        "durationMs": 0,
        "model": "string",
        "provider": "string",
        "tokens": {
          "property1": 0,
          "property2": 0
        },
        "cost": 0,
        "input": null,
        "output": null,
        "error": {},
        "attributes": {},
        "children": [
          null
        ]
      }
    ]
  }
}