POST
/
v1
/
devboxes
/
{id}
/
execute_async
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const devboxAsyncExecutionDetailView = await client.devboxes.executeAsync('id', { command: 'command' });

  console.log(devboxAsyncExecutionDetailView.devbox_id);
}

main();
{
  "devbox_id": "<string>",
  "execution_id": "<string>",
  "status": "queued",
  "shell_name": "<string>",
  "stdout": "<string>",
  "stderr": "<string>",
  "exit_status": 123
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

The Devbox ID.

Body

application/json
command
string
required

The command to execute via the Devbox shell. By default, commands are run from the user home directory unless shell_name is specified. If shell_name is specified the command is run from the directory based on the recent state of the persistent shell.

shell_name
string | null

The name of the persistent shell to create or use if already created. When using a persistent shell, the command will run from the directory at the end of the previous command and environment variables will be preserved.

Response

200
application/json
OK
devbox_id
string
required

Devbox id where command was executed.

execution_id
string
required

Ephemeral id of the execution in progress.

status
enum<string>
required

Current status of the execution.

Available options:
queued,
running,
completed
shell_name
string | null

Shell name.

stdout
string | null

Standard out generated by command. This field will remain unset until the execution has completed.

stderr
string | null

Standard error generated by command. This field will remain unset until the execution has completed.

exit_status
integer | null

Exit code of command execution. This field will remain unset until the execution has completed.