GET /plan-runs/:id
GET
/plan-runs/{id}
const url = 'https://example.com/plan-runs/example';const options = {method: 'GET'};
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/plan-runs/exampleParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Successful response.
Media typeapplication/json
object
planRun
required
object
id
required
string
planId
string | null
source
required
string
projectId
required
string
agentName
required
string
promptTemplate
required
string
ref
string | null
providerOverride
string | null
modelOverride
string | null
maxCostUsd
number | null
dispatcherHandle
required
string
trigger
required
string
state
required
string
failureReason
string | null
createdAt
required
string
startedAt
string | null
endedAt
string | null
children
required
Array<object>
object
planRunId
required
string
seq
required
integer
seedId
required
string
runId
required
string | null
state
required
string
createdAt
required
string
updatedAt
required
string
startedAt
string | null
endedAt
string | null
prMergedAt
string | null
failureReason
string | null
runs
required
Array<object>
object
id
required
string
agentName
required
string
projectId
string | null
sandboxId
string | null
sandboxRunId
string | null
seedId
string | null
parentRunId
string | null
cloneKind
string | null
mode
required
string
provider
string | null
model
string | null
renderedAgentJson
state
required
string
failureReason
string | null
createdAt
number | null
startedAt
string | null
endedAt
string | null
commitsAhead
integer | null
filesChanged
integer | null
insertions
integer | null
deletions
integer | null
prompt
required
string
trigger
required
string
prUrl
string | null
prState
string | null
prMergedAt
string | null
targetBranch
string | null
ref
string | null
salvageRef
string | null
salvagePath
string | null
costUsd
number | null
tokensInput
integer | null
tokensOutput
integer | null
tokensCacheRead
integer | null
tokensCacheWrite
integer | null
previewState
string | null
previewPort
integer | null
previewStartedAt
string | null
previewLastHitAt
string | null
previewFailureMessage
string | null
costBasis
required
string
Example
{ "planRun": { "source": "plan", "state": "queued" }, "children": [ { "state": "pending" } ], "runs": [ { "cloneKind": "replicate", "mode": "batch", "state": "queued", "failureReason": "never_started", "prState": "open", "previewState": "starting", "costBasis": "api" } ]}default
Section titled “default”Error response (see src/core/errors.ts).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
hint
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "hint": "example" }}