2018-03-18 23:27:58 +04:00
|
|
|
This document contains the list of RPC services provided by the Tezos
|
|
|
|
node. It is generated from the OCaml source code (master branch).
|
|
|
|
|
2018-03-07 13:44:24 +04:00
|
|
|
Usage
|
|
|
|
*****
|
|
|
|
|
|
|
|
In order to interact with a Tezos node, you may use RPC calls through the
|
2018-04-16 02:44:24 +04:00
|
|
|
client using this command ``tezos-admin-client rpc (get|post) <url>``.
|
2018-03-07 13:44:24 +04:00
|
|
|
|
|
|
|
For instance, if you wish to request the current balance of a given
|
|
|
|
block and contract, you can call the associated RPC via the command :
|
2018-04-16 02:44:22 +04:00
|
|
|
``$ tezos-admin-client rpc post
|
2018-03-07 13:44:24 +04:00
|
|
|
/blocks/<block_id>/proto/context/contracts/<contract_id>/balance``.
|
|
|
|
|
|
|
|
A RPC may takes an *input* and generates an *output* both in JSON
|
|
|
|
format. For example, the previous RPC call, that does not require an
|
|
|
|
input, would display on the standard output : ``{ "balance":
|
|
|
|
"4000000000000" }``. When calling a RPC that requires an input
|
|
|
|
through command-line, you will be prompted to provide the JSON input
|
2018-03-18 23:27:58 +04:00
|
|
|
in your default configured text editor. Alternatively, you can provide
|
|
|
|
the JSON input using command
|
2018-04-16 02:44:22 +04:00
|
|
|
``$ tezos-admin-client rpc post <url> with <JSON>``. Don't forget to quote
|
2018-03-18 23:27:58 +04:00
|
|
|
the JSON according to your shell rules.
|
|
|
|
|
|
|
|
You can also obtain the list of RPCs on the command line with
|
|
|
|
``tezos-admin-client rpc list /``, and the description of each service
|
|
|
|
using ``tezos-admin-client rpc format <url>``.
|
|
|
|
|
|
|
|
Of course, you can use your standard HTTP tool or library as well to
|
|
|
|
perform all these tasks.
|