---
title: "Connect to interactive server console session (WebSocket)"
method: GET
path: "/v1/server-console/session/{token}"
tags: ["Server Console"]
---

# Connect to interactive server console session (WebSocket)

`GET /v1/server-console/session/{token}`

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.

## Path parameters

- `token` string, uuid, required

## Other responses

- `101` — Switching protocols to WebSocket. If the token is invalid, expired or already used, the connection is closed right after the upgrade with WebSocket close code 1008 (Policy Violation) - no HTTP error status is returned in that case.
- `426` — Upgrade required - request did not ask for a protocol upgrade to WebSocket.

## Changes

- **2026-09-30** `a8eea04a807d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/netxms/apis/netxms-api/changes/v1/server-console/session/:token/get.md)

---

[API](https://skmtc.dev/netxms/apis/netxms-api.md) · [All operations](https://skmtc.dev/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/netxms/apis/netxms-api/revisions/129789f8868f?raw)
