diff --git a/docs/public-networks/how-to/use-besu-api/index.md b/docs/public-networks/how-to/use-besu-api/index.md index 5fca272858e..381c2e4ba93 100644 --- a/docs/public-networks/how-to/use-besu-api/index.md +++ b/docs/public-networks/how-to/use-besu-api/index.md @@ -13,6 +13,12 @@ Access the [Hyperledger Besu API](../../reference/api/index.md) using: - [RPC Pub/Sub over WebSockets](rpc-pubsub.md) - [GraphQL over HTTP](graphql.md). +:::note + +HTTP and WebSocket responses are compact JSON by default. You can use [`--json-pretty-print-enabled`](../../reference/cli/options.md#json-pretty-print-enabled) to pretty-print the output. + +::: + The following sections provide information about JSON-RPC, RPC Pub/Sub, and GraphQL. ## Enable API access diff --git a/docs/public-networks/reference/cli/options.md b/docs/public-networks/reference/cli/options.md index f49f23ec20d..14ab3d037f1 100644 --- a/docs/public-networks/reference/cli/options.md +++ b/docs/public-networks/reference/cli/options.md @@ -1101,6 +1101,38 @@ The name for the node. If specified, it's the second section of the client ID pr If a name is not specified, the name section is not included in the client ID. For example, `besu/v1.3.4/linux-x86_64/oracle_openjdk-java-11`. +### `json-pretty-print-enabled` + + + +# Syntax + +```bash +--json-pretty-print-enabled[=] +``` + +# Example + +```bash +--json-pretty-print-enabled=true +``` + +# Environment variable + +```bash +BESU_JSON_PRETTY_PRINT_ENABLED=true +``` + +# Configuration file + +```bash +json-pretty-print-enabled=true +``` + + + +Enables or disables the pretty-print output for HTTP and WebSocket responses. The default is `false`. + ### `key-value-storage` @@ -3531,38 +3563,6 @@ rpc-ws-port="6174" The port (TCP) on which WebSocket JSON-RPC listens. The default is `8546`. You must [expose ports appropriately](../../how-to/connect/configure-ports.md). -### `json-pretty-print-enabled` - - - -# Syntax - -```bash ---json-pretty-print-enabled[=] -``` - -# Example - -```bash ---json-pretty-print-enabled=true -``` - -# Environment variable - -```bash -BESU_JSON_PRETTY_PRINT_ENABLED=true -``` - -# Configuration file - -```bash -json-pretty-print-enabled=true -``` - - - -Enables or disables the pretty-print output for HTTP and WebSocket responses. The default is `false`. - ### `security-module`