Skip to content

Terminal

Browser terminal sessions held by the backend. The terminal stream itself is a WebSocket, not a REST call.

POST/api/terminal/ws-ticket
GET/api/terminal/sessions
GET/api/terminal/recent-servers
GET/api/terminal/sessions/:id/recovery
POST/api/terminal/sessions/:id/reconnect
POST/api/terminal/sessions/:id/duplicate
PATCH/api/terminal/sessions/:id
POST/api/terminal/sessions/:id/close

Mint 30s single-use WS ticket ​

POST/api/terminal/ws-ticket

Authentication: bearer token.
Permission: any signed-in user.

Request body

NameTypeRequiredNotes
purposestringYesOne of ssh.
paramsobjectYes
bash
curl -X POST "https://shellius.example.com/api/terminal/ws-ticket" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "purpose": "ssh",
    "params": {}
  }'

201 Created

json
{ "success": true, "data": { … } }

Own live hub sessions ​

GET/api/terminal/sessions

Caller's own live hub sessions.

Authentication: bearer token.
Permission: any signed-in user.

bash
curl -X GET "https://shellius.example.com/api/terminal/sessions" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Own recently-connected servers ​

GET/api/terminal/recent-servers

Servers the caller connected to recently (their own sessions only), for the dashboard's "Recent connections" widget. Quick Connects come from /quick-connect/history.

Authentication: bearer token.
Permission: any signed-in user.

Query parameters

NameTypeRequiredNotes
days—No
limit—No
bash
curl -X GET "https://shellius.example.com/api/terminal/recent-servers" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Why own session ended + next step ​

GET/api/terminal/sessions/:id/recovery

A workspace tab lost its live session (backend restart, expiry, admin terminate, detach timeout, remote exit…). Says what happened and the one next step that will work, based on the user's current access. Owner only (a foreign id is 404). See services/terminalRecoveryService.js.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X GET "https://shellius.example.com/api/terminal/sessions/{id}/recovery" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }

Reconnect spec for own lost session ​

POST/api/terminal/sessions/:id/reconnect

Connect spec for a NEW session replacing a lost one ({requestId, principal?} or a fresh single-use Quick Connect ticket for saved-identity connections). Same limiter as ws-ticket.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/terminal/sessions/{id}/reconnect" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

201 Created

json
{ "success": true, "data": { … } }

Duplicate own live session ​

POST/api/terminal/sessions/:id/duplicate

Connect info for a new session to the same target with the same auth.

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/terminal/sessions/{id}/duplicate" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

201 Created

json
{ "success": true, "data": { … } }

Rename own session ​

PATCH/api/terminal/sessions/:id

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring

Request body

NameTypeRequiredNotes
labelstringYes1–60 characters.
bash
curl -X PATCH "https://shellius.example.com/api/terminal/sessions/{id}" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "…"
  }'

200 OK

json
{ "success": true, "data": { … } }

Close own session ​

POST/api/terminal/sessions/:id/close

End the session (same as the {type:'close'} WS frame)

Authentication: bearer token.
Permission: any signed-in user.

Path parameters

NameTypeNotes
idstring
bash
curl -X POST "https://shellius.example.com/api/terminal/sessions/{id}/close" \
  -H "Authorization: Bearer $SHELLIUS_TOKEN"

200 OK

json
{ "success": true, "data": { … } }
Was this page helpful?No, tell us why