Browser Processes

Execute a command synchronously

post/browsers/{id_or_name}/process/exec

Request

  • Base URL
    https://api.onkernel.com
  • URL
    https://api.onkernel.com/browsers/{id_or_name}/process/exec
  • Auth
    HTTP bearer

Path parameters

id_or_namestring required

Browser session ID or name

Request body

argsstring[]

Command arguments.

as_rootboolean

Run the process with root privileges.

as_userstring nullable

Run the process as this user.

commandstring required

Executable or shell command to run.

cwdstring nullable

Working directory (absolute path) to run the command in.

envobject

Environment variables to set for the process.

timeout_secinteger nullable

Maximum execution time in seconds.

Response

Execution result

duration_msinteger

Execution duration in milliseconds.

exit_codeinteger

Process exit code.

stderr_b64string

Base64-encoded stderr buffer.

stdout_b64string

Base64-encoded stdout buffer.

Changes

No recorded changes to this operation across all 76 revisions of this API.