Server Console

Connect to interactive server console session (WebSocket)

WebSocket endpoint for interactive server console session. The token is obtained from POST /v1/server-console/session. Token is single-use and expires after 30 seconds.

All messages are JSON text frames. Client sends:

  • {"type":"command","command":"..."} - execute console command line (up to 255 characters)

Server sends:

  • {"type":"ready"} - server is ready to accept next command; sent after connection and after each command
  • {"type":"output","data":"..."} - command output chunk; may contain ANSI terminal color sequences
  • {"type":"error","message":"..."} - invalid message or command; followed by ready, except when the user no longer has SERVER_CONSOLE access right, in which case the session is closed
  • {"type":"closed","reason":"exit|shutdown"} - session is being closed by exit command or because down command initiated server shutdown

Commands are executed sequentially. Access rights of the session owner are checked before each command, so disabling the user or revoking SERVER_CONSOLE access right terminates the session.

get/v1/server-console/session/{token}

Path parameters

tokenstring uuid required

Single-use token from the session create response

Changes

Changed in 1 of the 128 revisions of this API.1