JSON-RPC endpoint
JSON-RPC Endpoint and Operations
With the JSON-RPC endpoint you can send multiple operations to the server that will be executed in a sequence in a single transaction.
Operation
This is the method name parameter in a request object.
Body of the Request
The body of the request for the JSON-RPC endpoint follows the specification of the JSON-RPC 2.0. Please check https://www.jsonrpc.org/specification.
request: Array with elements of type:
- id: A string which is a unique identification in the operation.
- jsonrpc: A String specifying the version of the JSON-RPC protocol. MUST be exactly "2.0".
- method: Operation type identification.
- params: Type, dependent on operation.
Each operation has an id associated with it that can be chosen freely and which is unique within this batch request. If the operation provides result data, then this data is found under the id in the response, otherwise the operation would be found in the exception section under the same id.
The parameter’s sub-structure is completely defined by its operation.
Header of the request
You might need to pass the header request along the request for the authorization when accessing to the protected resources. See project permission for more detail
Response of the JSON-RPC request
The response for the JSON-RPC endpoint also follows the specification of the JSON-RPC 2.0. Please check https://www.jsonrpc.org/specification. Operations may but do not need to provide a result. Therefore, the result will be null for those operations, which execute a command that does not return any data.