Skip to main content
POST
Run a command in your demo sandbox
Preview, OneCLI Cloud only. onecli demo run calls it. At most 30 calls a minute. See Demo sandbox. Runs one shell command in your own demo sandbox and returns its output. It is stopped after 45 seconds. Each of stdout and stderr is cut at 64 KB. 30 calls a minute.
Availability: OneCLI Cloud only. A self-hosted deployment does not serve this endpoint and answers 404 with error.code: "not_found".Who can call: Any member of the organization, with a managing key (oc_key_...) that has the manage permission, or a signed-in session.

Authorizations

Authorization
string
header
required

A managing key (oc_key_...), an older API key (oc_...), or a signed-in session.

Headers

Idempotency-Key
string

Not accepted on this call. Sending it is 400 bad_request.

Required string length: 1 - 255

Body

application/json
command
string
required

One shell command, 1 to 4000 characters.

Required string length: 1 - 4000
Example:

"curl -s https://httpbin.org/bearer"

Response

What the command answered.

exitCode
integer
required

The command's exit code. 124: it was stopped after 45 seconds.

stderr
string
required
stdout
string
required
truncated
boolean
required

true: stdout or stderr was cut at 64 KB.