WebSocket Management

Composer exposes a WebSocket server that remote-control surfaces and integrations connect to for bidirectional, low-latency command and state traffic. This section lets an administrator see who is currently attached and forcibly cut connections — enumerate the live clients with their address and connect time, drop a single misbehaving or stale client by GUID, or disconnect everyone at once (handy before a project reload or when reclaiming a runaway session). These endpoints manage the transport only; they don't touch the project or its components.

GET /api/websocket/clients

Lists all connected WebSocket clients.

Parameters: None

Response: 200 OK — JSON array:

[
  {
    "Guid": "client-guid",
    "Ip": "192.168.1.100",
    "Port": 54321,
    "ConnectedAt": "2025-01-01T10:00:00.000Z"
  }
]

GET /api/websocket/disconnect

Disconnects a specific WebSocket client by IP address.

Parameters:

Parameter Required Description
ip Yes IP address of the client to disconnect
reason No Disconnect reason message

Response:

  • 200 OKDisconnected client with IP {ip}
  • 400 Bad Request — Missing IP parameter
  • 404 Not Found — No client found with that IP
  • 503 Service Unavailable — WebSocket server not running

GET /api/websocket/disconnectall

Disconnects all connected WebSocket clients.

Parameters:

Parameter Required Description
reason No Disconnect reason message

Response:

  • 200 OKDisconnected {count} WebSocket client(s)
  • 200 OKNo WebSocket clients are currently connected
  • 503 Service Unavailable — WebSocket server not running