Skip to main content
Version: 3.5.x

JSON Conventions

All service interfaces use JSON. This page documents the shared patterns.

Ports

PortInterfaceVersion
10001HTTP REST + WebSocket (simulation channel)v3.1 (current)
10020WebSocket (events channel, read-only)
10000Legacy WebSocket (v3.0 — will be removed in v4.0)v3.0

HTTP response envelope

Every HTTP response uses the same envelope:

Success (with data):

{ "ok": true, "data": {} }

Success (no data — mutation-only endpoints):

{ "ok": true }

Error:

{ "ok": false, "error": "reason string" }

Deprecated endpoint:

{ "ok": true, "deprecation_warning": "This route is deprecated. Use …" }

HTTP status codes

CodeMeaning
200Success
400Bad request — invalid body, ambiguous selector, missing required field
404Device, session, or resource not found
405Method not allowed

WebSocket message format

Messages are JSON objects. The top-level keys are device group names (inverse3, verse_grip, wireless_verse_grip) and an optional session key for session-level commands.

Client → service (command):

{
"session": { "configure": {} },
"inverse3": [
{ "device_id": "049D", "configure": {}, "commands": {} }
]
}

Service → client (state):

{
"session_id": 7,
"inverse3": [
{ "device_id": "049D", "config": {}, "state": {}, "status": {} }
]
}

The first message from the service includes config (full snapshot); subsequent messages include only state and status. See WebSocket Protocol for the full workflow.

Content type

All HTTP requests with a body must send Content-Type: application/json. WebSocket messages are always plain-text JSON frames.

Unknown keys

Unknown keys are silently ignored

The service currently ignores unrecognised JSON keys without error. If a command seems to have no effect, check the service logs and verify the field names against the API Reference. This behaviour is planned to change in a future version (unknown keys will trigger a warning event).