Runs
Get a run's AI analysis
Get a run’s AI analysis. Requires permission workflows:read.
GET
Get a run's AI analysis
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.
v2 compatibility notes
Returns a run’s AI analysis: therunId, when the analysis started (createdAt), and its first 50 messages, oldest first. meta.partial is true when more exist; page them with GET /api/v2/runs/listAnalysisMessages. A run without an analysis answers 404 “Analysis not found”; start one with POST /api/v2/runs/startAnalysis.
Each message has its id, its order (a turn’s messages share one) and stepOrder within the turn, its role (system, user or assistant; tool results arrive inside the assistant message’s toolCalls), its status, its text, the agentName that wrote it, its reasoning, and its toolCalls (each a toolName, its input, its output or error text, and the AI SDK state). Credential-shaped strings (JWTs, Bearer tokens, x-access-token: URLs and GitHub tokens) are replaced by a [REDACTED] marker. Never the agent thread, who wrote the message, or the message’s raw parts or metadata.
Authority
You needworkflows:read at the platform scope, the key the Console’s analysis reads use, and your scopes must also reach runs:read. Either missing answers a recorded 403 naming it. A key with workflows:read only at an org unit is refused, and so is one holding platform:manage without workflows:read. Starting an analysis with POST /api/v2/runs/startAnalysis still needs platform:manage.
You need runs:read at the run’s home (its own org unit, else its workflow’s owning org unit) and at every company it carries, the same rule as GET /api/v2/runs/get. Any other run, and a run with neither home, answers 404 “Run not found” like a missing one. A Personal key reads as its owner, cut down to the key’s scopes; an External App reads by its own role grants.
id is required; a missing id answers 404 “Run not found”.
