Skip to main content
POST /v1/machines/{id}/run runs a command on the machine. Running a command on a paused machine resumes it first, and the response says "resumed": true.

Short commands: wait for the output

With "wait": true the call waits up to about 60 seconds and returns {job_id, status, exit_code, stdout, stderr, truncated, resumed, next}. stderr is merged into stdout in order, so stderr is always empty. When the output is longer than 256 KB, stdout holds the last 256 KB and truncated is true; read all of it from the job’s logs. If the command is still running after about 60 seconds, the call returns the running job instead (202), and you follow it as below.
A non-zero exit_code means the command failed. voyager-cloud exec waits for any length of command, streams its output and exits with the same code.

Long commands: jobs

Without wait, the call returns 202 with a job (mjb_…) straight away. With the CLI:
A machine pauses itself after idle_timeout seconds without a command or file transfer.