Run a buffered command
const url = 'http://127.0.0.1:8080/v1/runtimes/example/exec';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"args":[],"command":"example","cwd":"example","env":{"additionalProperty":"example"},"max_output_bytes":1,"stdin":"example","timeout_secs":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/v1/runtimes/example/exec \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "args": [], "command": "example", "cwd": "example", "env": { "additionalProperty": "example" }, "max_output_bytes": 1, "stdin": "example", "timeout_secs": 1 }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Runtime UUID or display name.
Runtime UUID or display name.
Request Body required
Section titled “Request Body required ”Buffered command execution request.
Buffered command execution request.
object
Positional arguments.
Executable or shell command.
Working directory inside the runtime.
Environment variables.
object
Maximum bytes to retain per output stream.
Standard input as UTF-8 text.
Timeout in seconds.
Responses
Section titled “ Responses ”Response envelope.
Response envelope.
object
Buffered command execution response.
object
Wall-clock execution duration in milliseconds.
Process exit code.
Captured standard error as UTF-8 lossily decoded text.
Whether stderr exceeded the requested cap.
Captured standard output as UTF-8 lossily decoded text.
Whether stdout exceeded the requested cap.
Example generated
{ "data": { "duration_ms": 1, "exit_code": 1, "stderr": "example", "stderr_truncated": true, "stdout": "example", "stdout_truncated": true }}Missing, malformed, or rejected bearer token
object
object
Example
{ "error": { "code": "already_exists" }}The bearer token is not allowed to perform this action
object
object
Example
{ "error": { "code": "already_exists" }}The requested resource was not found
object
object
Example
{ "error": { "code": "already_exists" }}The request conflicts with current resource state
object
object
Example
{ "error": { "code": "already_exists" }}Validation or application error
object
object
Example
{ "error": { "code": "already_exists" }}Rate limit exceeded
object
object
Example
{ "error": { "code": "already_exists" }}Upstream service is unavailable
object
object
Example
{ "error": { "code": "already_exists" }}Upstream request timed out
object
object
Example
{ "error": { "code": "already_exists" }}default
Section titled “default ”Error response
object
object
Example
{ "error": { "code": "already_exists" }}