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.

TypeAPI Key (header: Authorization)
Example"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Parameters

Path Parameters

device*

Device ID or identifier

Typestring
Required

Query Parameters

encoding

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

Typestring
Default"json"

Request Body

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

Responses

Incoming message from device

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

Playground

Authorization
Variables
Key
Value
Body

Samples

cURL
JavaScript
PHP
Python