Skip to content

Device WebSocket​

GET
/chasm/ws/{device}

Establishes a WebSocket connection to send and receive messages from a single device

🧪 Alpha

This endpoint is alpha, and may change while being tested.

This documentation page also does not lend itself to a websocket endpoint, this is not a GET. Please see schema descriptions and various response codes for detailed examples of messages.

Supports multiple encoding formats: json, hex, decimal, base64

Authorizations​

ApiKeyAuth

API Key for authentication. Retrieval from either API version login routes, or other authentication token type. See Authentication for more details.

Type
API Key (header: Authorization)
Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Parameters​

Path Parameters

device*

Device ID or identifier

Type
string
Required

Query Parameters

encoding

Message encoding format (json|hex|decimal|base64)

Type
string
Default
"json"

Request Body​

application/json
JSON
{
  
"data": "03 18 00 05 00 02",
  
"encoding": "hex",
  
"messageId": "msg-123",
  
"type": "out"
}

Request example

Responses​

Incoming message from device

application/json
JSON
{
  
"data": "a5 b2 c3 d4",
  
"encoding": "hex",
  
"timestamp": "2024-01-10T15:30:45.123Z",
  
"type": "in"
}
Try this endpoint

Playground​

Authorization
Variables
Key
Value
Body