Skip to main content
POST
/
api
/
v1
/
vm
/
{vm_id}
/
exec
/
stream
cURL
curl --request POST \
  --url https://api.example.com/api/v1/vm/{vm_id}/exec/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "command": [
    "<string>"
  ],
  "env": {},
  "exec_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "stdin": "<string>",
  "timeout_secs": 1,
  "working_dir": "<string>"
}
'
{
  "error": "<string>",
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

vm_id
string<uuid>
required

VM ID

Body

application/json

Request body for POST /api/vm/{vm_id}/exec

command
string[]
required

Command and arguments to execute.

env
object

Optional environment variables to set for the process.

exec_id
string<uuid> | null

Optional exec identifier for tracking.

stdin
string | null

Optional stdin payload passed to the command.

timeout_secs
integer<int64> | null

Timeout in seconds (0 = no timeout).

Required range: x >= 0
working_dir
string | null

Optional working directory for the command.

Response

NDJSON stream of stdout/stderr chunks