ws://host:port/stream with Authorization: Bearer {API_KEY} header.
All messages follow JSON-RPC 2.0 format.
Read Methods
kv/get
kv/list
kv/mget
Batch read — multiple keys in one round-trip.Write Methods
kv/set
cas parameter for compare-and-swap (optimistic concurrency):
-32002 CAS Conflict.
kv/delete
kv/batch
Atomic multi-key write.Watch Subscriptions
watch/subscribe
Subscribe to changes in a namespace. Receiveswatch/change notifications.
watch/unsubscribe
watch/change (Server Notification)
Sent when a subscribed namespace changes. Noid field (notification, not request).
Error Codes
| Code | Name | Description |
|---|---|---|
-32700 | Parse Error | Invalid JSON |
-32600 | Invalid Request | Malformed JSON-RPC |
-32601 | Method Not Found | Unknown method |
-32602 | Invalid Params | Missing or invalid parameters |
-32603 | Internal Error | Server error |
-32001 | Not Leader | Write on non-leader; error.data.leader has leader address |
-32002 | CAS Conflict | Version mismatch (optimistic concurrency) |
-32003 | Unauthorized | Invalid or missing API key |
-32004 | Not Found | Key does not exist |
-32005 | Read Only | Agent API key used for write operation |