diff --git a/docs/doc_gen/errors/error_doc.ml b/docs/doc_gen/errors/error_doc.ml index bd6877d91..481983433 100644 --- a/docs/doc_gen/errors/error_doc.ml +++ b/docs/doc_gen/errors/error_doc.ml @@ -230,9 +230,10 @@ let () = print_script ppf ; - fprintf ppf "This document references possible errors that can come\ - from RPC calls. It is generated from the OCaml source\ - code (master branch).@\n@\n" ; + fprintf ppf + "This document references possible errors that can come \ + from RPC calls. It is generated from the OCaml source \ + code (master branch).@\n@\n" ; (* Body *) let map = diff --git a/docs/doc_gen/rpcs/rpc_doc.ml b/docs/doc_gen/rpcs/rpc_doc.ml index e96e84680..bd9ae3a2c 100644 --- a/docs/doc_gen/rpcs/rpc_doc.ml +++ b/docs/doc_gen/rpcs/rpc_doc.ml @@ -299,9 +299,9 @@ let pp_print_html_tabs fmt { path ; description ; input ; output ; _ (* example fprintf fmt "%a" (pp_print_html_tab_button ~default:true ~shortlabel:"descr" ~content:"Description") path; (match input with | Some _ -> - fprintf fmt "%a" (pp_print_html_tab_button ~default:false ~shortlabel:"input" ~content:"Input schema") path; + fprintf fmt "%a" (pp_print_html_tab_button ~default:false ~shortlabel:"input" ~content:"Input format") path; | None -> ()); - fprintf fmt "%a" (pp_print_html_tab_button ~default:false ~shortlabel:"output" ~content:"Output schema") path; + fprintf fmt "%a" (pp_print_html_tab_button ~default:false ~shortlabel:"output" ~content:"Output format") path; (* (match example with * | Some _ -> * fprintf fmt "%a" (pp_print_html_tab_button ~default:false ~shortlabel:"example" ~content:"Example") path; diff --git a/docs/doc_gen/rpcs/usage.rst b/docs/doc_gen/rpcs/usage.rst index 7c618f23d..072c24cab 100644 --- a/docs/doc_gen/rpcs/usage.rst +++ b/docs/doc_gen/rpcs/usage.rst @@ -1,12 +1,15 @@ +This document contains the list of RPC services provided by the Tezos +node. It is generated from the OCaml source code (master branch). + Usage ***** In order to interact with a Tezos node, you may use RPC calls through the -client using this command ``tezos-client rpc call ``. +client using this command ``tezos-admin-client rpc call ``. 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 : -``$ tezos-client rpc call +``$ tezos-admin-client rpc call /blocks//proto/context/contracts//balance``. A RPC may takes an *input* and generates an *output* both in JSON @@ -14,4 +17,14 @@ 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 -in your default configured text editor. +in your default configured text editor. Alternatively, you can provide +the JSON input using command +``$ tezos-admin-client rpc call with ``. Don't forget to quote +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 ``. + +Of course, you can use your standard HTTP tool or library as well to +perform all these tasks.