ChartnautDocs

Get a run

GET/runs/{run_id}

Returns one run's status, progress and summary, and can hold until it finishes. It is how you wait for a run.

Scope

Heavy call

Long poll

CLI

scripts:read

No

wait, up to 30 s

chartnaut runs get

Guidance

  • Poll with wait=30 in a loop until status is succeeded, failed or cancelled. Each call returns as soon as the run finishes, so there is no need to sleep between calls.

  • Past your plan's long polls at once, the call answers straight away with the run as it is. If an unfinished run comes back in under a second or two, wait 2 seconds before the next poll, as the CLI does.

  • A 200 means the run has finished and a 202 means it has not. Read status to tell success from failure.

  • On failed, read failure: retryable: true means running it again can help, and failure.diagnostics names what stopped a script before it produced anything. Errors and exit codes explains each kind.

  • On succeeded, summary has the counts. Call Get run results for the points, events or result blocks.

  • console holds the first 50 lines an indicator or definition printed, once the run has finished. Read it when a run succeeds but the numbers look wrong.

Path parameters

Name

Type

Description

run_id

string

A run id, run_… or srun_…

Query parameters

Name

Type

Required

Default

Description

wait

integer

No

0

Seconds to hold until the run finishes, 0 to 30. Values outside the range are clamped

Response

Returns a Run: 200 when it has finished, 202 while it is still queued or running.

Status codes

Status

Code

Meaning

200

-

The run has finished: succeeded, failed or cancelled

202

-

The run is still queued or running. Poll again

404

not_found

You have no run with that id