WebSocket Protocol
Endpoint: ws://<host>:2900/v1/ws
Transport: RFC 6455
Message format: JSON text frames (server may send gzip-compressed binary frames for larger payloads)
Connection And Authentication
Upgrade
Client opens GET /v1/ws.
Server can reject pre-upgrade for:
- shutdown mode
- origin policy failure
- strict origin check with missing
Originheader
Origin policy
Origin allow-list resolution:
security.allowed_ws_originsif non-empty- otherwise
security.cors.allowed_origins
Post-connect auth (required)
Success:
Failure:
Client Messages
authenticatesubscribenext_batchunsubscribe
subscribe
next_batch
unsubscribe
Server Messages
auth_success/auth_errorsubscription_ackinitial_data_batchchangeerror
subscription_ack
initial_data_batch
change
change_type values:
insertupdatedelete
error
Limits
rate_limit.max_subscriptions_per_user(default10)- hard cap per connection:
100 security.max_ws_message_size(default1MB)rate_limit.max_messages_per_sec(default50)- auth timeout:
websocket.auth_timeout_secs(default3)
Error Codes
Common WebSocket protocol/error codes include:
AUTH_REQUIREDINVALID_SUBSCRIPTION_IDSUBSCRIPTION_LIMIT_EXCEEDEDINVALID_SQLRATE_LIMIT_EXCEEDEDMESSAGE_TOO_LARGEUNSUPPORTED_DATAPROTOCOL
For endpoint auth matrix and SQL payload contracts, see HTTP API Reference.
Last updated on