Skip to main content
POST
/
v1
/
devboxes
/
{id}
/
write_file_contents
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: 'My Bearer Token',
});

const devboxExecutionDetailView = await client.devboxes.writeFileContents('id', {
  contents: 'contents',
  file_path: 'file_path',
});

console.log(devboxExecutionDetailView.devbox_id);
{
  "devbox_id": "<string>",
  "stdout": "<string>",
  "stderr": "<string>",
  "exit_status": 123,
  "shell_name": "<string>"
}

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
file_path
string
required

The path to write the file to on the Devbox. Path is relative to user home directory.

contents
string
required

The UTF-8 string contents to write to the file.

Response

OK

devbox_id
string
required

Devbox id where command was executed.

stdout
string
required

Standard out generated by command.

stderr
string
required

Standard error generated by command.

exit_status
integer
required

Exit status of command execution.

shell_name
string | null

Shell name.