Open a web shell session
curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/webshell/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"cols": 80,
"rows": 24
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', cols: 80, rows: 24})
};
fetch('https://my.server.express/api/v1/cloud/{id}/webshell/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/cloud/{id}/webshell/session"
payload = {
"code": "<string>",
"cols": 80,
"rows": 24
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"sessionId": "<string>",
"token": "<string>",
"expiresInMs": 123,
"path": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Cloud
Open a web shell session
Verifies a second-factor code (TOTP or backup code) — required every time — checks the guest agent is reachable,
starts a pty on the VM and mints a 30-minute session. Connect a WebSocket to path on the API origin. Linux only.
Session auth only; needs the operate role. 403 while PENDING/SUSPENDED; 401 on a wrong code (audited as
WEBSHELL_DENIED); 409 if two-factor isn’t enabled, the OS is Windows, the guest agent can’t be reached, or the guest
lacks script (util-linux). Writes a WEBSHELL_OPEN audit entry on success.
POST
/
v1
/
cloud
/
{id}
/
webshell
/
session
Open a web shell session
curl --request POST \
--url https://my.server.express/api/v1/cloud/{id}/webshell/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"cols": 80,
"rows": 24
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', cols: 80, rows: 24})
};
fetch('https://my.server.express/api/v1/cloud/{id}/webshell/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/cloud/{id}/webshell/session"
payload = {
"code": "<string>",
"cols": 80,
"rows": 24
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"sessionId": "<string>",
"token": "<string>",
"expiresInMs": 123,
"path": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
Service id of the cloud server.
Body
application/json