Skip to main content
POST
Execute PTY session action

Authorizations

X-API-Key
string
header
required

API key for authentication (format: vr_...)

Path Parameters

id
string
required

Body

application/json
action
enum<string>
required
Available options:
create,
exec,
input,
resize,
close
Example:

"create"

sessionId
string

Required for all actions except create

Example:

"sess-1a2b3c4d5e6f7788"

shell
string
Example:

"/bin/bash"

command
string

Required when action is exec

Example:

"ls -la"

input
string

Input text when action is input

Example:

"y\n"

cols
integer

Required when action is resize

Required range: 1 <= x <= 500
Example:

120

rows
integer

Required when action is resize

Required range: 1 <= x <= 200
Example:

40

Response

Session action result

success
boolean
Example:

true

sessionId
string
Example:

"sess-1a2b3c4d5e6f7788"

output
string
Example:

"command output"

error
string | null
Example:

""

exitCode
integer
Example:

0