Browser Processes

Execute a command asynchronously

post/browsers/{id_or_name}/process/spawn

Request

  • Base URL
    https://api.onkernel.com
  • URL
    https://api.onkernel.com/browsers/{id_or_name}/process/spawn
  • 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.

allocate_ttyboolean

Allocate a pseudo-terminal (PTY) for interactive shells.

colsinteger

Initial terminal columns. Only used when allocate_tty is true.

rowsinteger

Initial terminal rows. Only used when allocate_tty is true.

Response

Spawned

pidinteger

OS process ID.

process_idstring uuid

Server-assigned identifier for the process.

started_atstring date-time

Timestamp when the process started.

Changes

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