-
androlo authored0050e4ec
api.md 40.66 KiB
Eris DB web APIs (draft)
for eris-db version 0.11.x
Eris DB allows remote access to its functionality over http and websocket. It currently supports JSON-RPC 2.0, and REST-like http. There is also javascript bindings available in the erisdb-js library.
TOC
- HTTP Requests
- JSON-RPC 2.0
- REST-like HTTP
- Common objects and formatting
- Event-system
- Methods
- NameReg
- Filters
HTTP Requests
The only data format supported is JSON. All post requests needs to use Content-Type: application/json
. The charset flag is not supported (json is utf-8 encoded by default).
JSON RPC 2.0
The default endpoints for JSON-RPC (2.0) is /rpc
for http based, and /socketrpc
for websocket. The namespace for the JSON-RPC service is erisdb
.
It does not yet support notifications or batched requests.
Objects
Errors
PARSE_ERROR = -32700
INVALID_REQUEST = -32600
METHOD_NOT_FOUND = -32601
INVALID_PARAMS = -32602
INTERNAL_ERROR = -32603
#####Request
{
jsonrpc: <string>
method: <string>
params: <Object>
id: <string>
}
#####Response
{
jsonrpc: <string>
id: <string>
result: <Object>
error: <Error>
}
#####Error