Skip to main content
Run a shell line

Authorizations

Authorization
string
header
required

The server's token (MIRAGE_AUTH_TOKEN) or a JWT. A daemon in the default local mode with no token accepts requests without one.

Path Parameters

workspace_id
string
required

The workspace's id.

Query Parameters

session_id
string

The session the call acts as; the default session when absent.

explain
boolean
default:false

Return what the call would do without running it.

stream
boolean
default:false

Stream stdout, stderr and the final status as NDJSON. Cannot be combined with explain.

Body

command
string
required

The line.

cwd
string

A working directory for this line only.

runtime
string

Run the line on this runtime, by name, instead of the one routing picks.

record
boolean
default:true

Add the line to the session's history.

Response

The line's result; with explain=true, its explanation; with stream=true, an NDJSON stream ending in a status record

kind
string
required
exit_code
integer
required
stdout
string
required
stderr
string
required
refusal
object | null