WebSocket Overview
The Rhombus platform exposes a WebSocket endpoint for real-time, bidirectional communication between your application and the Rhombus console. This allows you to receive instant notifications about security events, policy alerts, device changes, and other organizational activity without polling the REST API.How It Works
Rhombus WebSocket connections use the STOMP 1.2 (Streaming Text Oriented Messaging Protocol) messaging protocol layered on top of a standard WebSocket connection. STOMP provides a simple, frame-based protocol for subscribing to topics and receiving structured messages.Connection Endpoint
| Environment | Endpoint |
|---|---|
| Production | wss://ws.rhombussystems.com:8443/websocket |
| Staging | wss://ws.itg.rhombussystems.com:8443/websocket |
Key Concepts
Topics
Once connected, you subscribe to a topic to receive messages. The primary topic for organizational events is:Event Types
Each message on the change topic contains a JSON payload with:| Field | Description |
|---|---|
entity | The type of entity that changed (e.g., POLICY_ALERT, DEVICE_CONFIG) |
entityUuid | Unique identifier for the entity |
type | The change type: CREATE, UPDATE, or DELETE |
deviceUuid | Associated device UUID (when applicable) |
timestampMs | Unix timestamp in milliseconds |
Authentication
WebSocket connections authenticate using API tokens only. Certificate-based (mTLS) authentication is not supported for WebSocket. The token is passed as an HTTP header during the WebSocket handshake.If you currently authenticate to the Rhombus REST API using certificates, you will need a separate API token for WebSocket connections.
When to Use WebSocket vs. REST API
| Use Case | Recommended Approach |
|---|---|
| React to alerts in real time | WebSocket |
| Build a live dashboard | WebSocket |
| Trigger automations on events | WebSocket |
| Query historical data | REST API |
| Manage devices or users | REST API |
| Retrieve video clips | REST API (DASH streaming) |
What’s Next
Authentication
Configure API token authentication for WebSocket connections.
Connection Lifecycle
Establish, maintain, and gracefully close connections.
Event Monitoring
Subscribe to topics and process real-time events.
Code Examples
Full working examples in Python, JavaScript, and Go.