Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
22d8e71
Windows is now supported in the quickstart (#143)
EdJoJob Feb 6, 2020
499f962
quickstart updates all round (#141)
joshuafernandes Feb 9, 2020
3712369
Fixed typo (#150)
MadelineMurray Feb 10, 2020
2715ab6
Add multi-tenancy information. (#131)
bgravenorst Feb 10, 2020
c826849
Apply renames for the quickstart repo (#152)
EdJoJob Feb 12, 2020
0379da7
Added content on protocol upgrades (#132)
MadelineMurray Feb 13, 2020
a6be934
Fixed Ansible link and renamed topic (#168)
MadelineMurray Feb 14, 2020
cf2cd97
permissioning (#170)
wslyvh Feb 14, 2020
413c913
Vale and mdlint editorial updates - DCO.md (#162)
Feb 14, 2020
d4412d9
updated CI and customised checks (#165)
NicolasMassart Feb 19, 2020
3c2350d
Added new NAT options (#179)
MadelineMurray Feb 20, 2020
0aac597
Editorial mdlint vale updates for Concepts/Transactions directory (#185)
Feb 20, 2020
36219ff
Editorial mklint and vale updates in Concepts/Permissioning dir (#181)
Feb 20, 2020
7cc3993
mdlint and vale editorial updates in Concepts/Consensus-Protocols dir…
Feb 20, 2020
85316a3
mdlint and vale editorial edits in the Concepts directory (#177)
Feb 20, 2020
b158642
vale and mklint editorial updates - CONTRIBUTING.md (#163)
Feb 20, 2020
f69ea29
mdlint and vale editorial updates - index.md (#169)
Feb 20, 2020
f75f3c6
Added plugins_reloadPluginConfig (#184)
MadelineMurray Feb 21, 2020
c349917
[BESU-163] Add inbound and outbound TLS information. (#124)
bgravenorst Feb 21, 2020
1ab4552
Add multi-tenancy whitelist info. (#193)
bgravenorst Feb 24, 2020
a278fce
add redirect plugin and initial configuration from RTD redirects (#172)
NicolasMassart Feb 24, 2020
057be89
Editorial mdlint and vale updates in the Concepts/Privacy dir (#183)
Feb 25, 2020
af2b184
Editorial mdlink and vale updates for HowTo/Configure directory (#187)
Feb 25, 2020
c72fb6a
Editorial mdlint and vale updates to Howto/Backup directory (#186)
Feb 25, 2020
3b74005
add an info pass for md linting (#205)
NicolasMassart Feb 25, 2020
0ade2c8
add postman collection locally and fix the postman button style (#174)
NicolasMassart Feb 25, 2020
4b9307f
fix code blocks in doc by updating mkdocs and dependencies (#158)
NicolasMassart Feb 25, 2020
56c6c22
Add links to TLS content. (#191)
bgravenorst Feb 25, 2020
394759c
Add TLS diagram. (#194)
bgravenorst Feb 25, 2020
e22ad07
Add Besu Plugin information (#142)
bgravenorst Feb 26, 2020
e08955f
Added reorg compatible privacy (#192)
MadelineMurray Feb 26, 2020
2f66e17
add priv_call API Method (#144)
Feb 26, 2020
3e1fc00
Added tracing API (#182)
MadelineMurray Feb 26, 2020
644ce39
Add Grant as a maintainer (#199)
NicolasMassart Feb 26, 2020
364f7d3
Added auto log bloom caching option (#210)
MadelineMurray Feb 26, 2020
acbcd8f
Added caution about pruning bug (#212)
MadelineMurray Feb 27, 2020
2577e92
Updated per feedback (#213)
MadelineMurray Feb 27, 2020
8974f05
Editorial mdlint and vale updates to HowTo/Interact/APIs dir
Feb 27, 2020
0d3dc85
More changes, espec to Using-JSON-RPC-API.md
Feb 27, 2020
ec3514f
A few minor changes
Feb 27, 2020
6caadb4
Merge branch 'master' into grantnoble-howto-interact-apis-mdlint-vale
Feb 27, 2020
97abb51
Merge branch 'master' into grantnoble-howto-interact-apis-mdlint-vale
Mar 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 49 additions & 33 deletions docs/HowTo/Interact/APIs/API.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,87 @@
---
description: Hyperledger Besu API
<!--- END of page meta data -->
---

# Access the Hyperledger Besu API

Access the [Hyperledger Besu API](../../../Reference/API-Methods.md) using:

* [JSON-RPC over HTTP or WebSockets](Using-JSON-RPC-API.md)
* [JSON-RPC over HTTP or WebSockets](Using-JSON-RPC-API.md)
* [RPC Pub/Sub over WebSockets](RPC-PubSub.md)
* [GraphQL over HTTP](GraphQL.md)
* [GraphQL over HTTP](GraphQL.md).

The following sections provide information about JSON-RPC, RPC Pub/Sub, and GraphQL.

Information applying to JSON-RPC, RPC Pub/Sub, and GraphQL is included below.
## Enabling API access

## Enabling API Access
To enable API access, use the
[`--rpc-http-enabled`](../../../Reference/CLI/CLI-Syntax.md#rpc-http-enabled),
[`--ws-http-enabled`](../../../Reference/CLI/CLI-Syntax.md#rpc-ws-enabled), and
[`--graphql-http-enabled`](../../../Reference/CLI/CLI-Syntax.md#graphql-http-enabled) options.

Use the [`--rpc-http-enabled`](../../../Reference/CLI/CLI-Syntax.md#rpc-http-enabled), [`--ws-http-enabled`](../../../Reference/CLI/CLI-Syntax.md#rpc-ws-enabled),
and [`--graphql-http-enabled`](../../../Reference/CLI/CLI-Syntax.md#graphql-http-enabled) options to enable API access.
## Service hosts

## Service Hosts
To specify the host the API service listens on, use the
[`--rpc-http-host`](../../../Reference/CLI/CLI-Syntax.md#rpc-http-host),
[`--rpc-ws-host`](../../../Reference/CLI/CLI-Syntax.md#rpc-ws-host), and
[`--graphql-http-host`](../../../Reference/CLI/CLI-Syntax.md#graphql-http-host) options. The
default host is `127.0.0.1`.

Use the [`--rpc-http-host`](../../../Reference/CLI/CLI-Syntax.md#rpc-http-host), [`--rpc-ws-host`](../../../Reference/CLI/CLI-Syntax.md#rpc-ws-host),
and [`--graphql-http-host`](../../../Reference/CLI/CLI-Syntax.md#graphql-http-host) options to specify the host on which the API service listens.
The default host is 127.0.0.1.
To allow remote connections, set the host to `0.0.0.0`.

Set the host to `0.0.0.0` to allow remote connections.
!!! caution

!!! caution
Setting the host to 0.0.0.0 exposes the API service connection on your node to any remote connection. In a
production environment, ensure you use a firewall to avoid exposing your node to the internet.
Setting the host to `0.0.0.0` exposes the API service connection on your node to any remote
connection. In a production environment, ensure you use a firewall to avoid exposing your node
to the internet.

## Service Ports
## Service ports

Use the [`--rpc-http-port`](../../../Reference/CLI/CLI-Syntax.md#rpc-http-port), [`--rpc-ws-port`](../../../Reference/CLI/CLI-Syntax.md#rpc-ws-port),
and [`--graphql-http-port`](../../../Reference/CLI/CLI-Syntax.md#graphql-http-port) options to specify the port on which the API service listens.
To specify the port the API service listens on, use the
[`--rpc-http-port`](../../../Reference/CLI/CLI-Syntax.md#rpc-http-port),
[`--rpc-ws-port`](../../../Reference/CLI/CLI-Syntax.md#rpc-ws-port), and
[`--graphql-http-port`](../../../Reference/CLI/CLI-Syntax.md#graphql-http-port) options.

The default ports are:
The default ports are:

* 8545 for JSON-RPC over HTTP
* 8546 for JSON-RPC over WebSockets
* 8547 for GraphQL over HTTP
* 8547 for GraphQL over HTTP.

Ports must be [exposed appropriately](../../Find-and-Connect/Managing-Peers.md#port-configuration).

## Host Whitelist
## Host whitelist

To prevent DNS rebinding, incoming HTTP requests, WebSockets connections, and GraphQL requests are only accepted from hostnames
specified using the [`--host-whitelist`](../../../Reference/CLI/CLI-Syntax.md#host-whitelist) option.
By default, `localhost` and `127.0.0.1` are accepted.
To prevent DNS rebinding, Besu accepts incoming HTTP requests, WebSockets connections, and GraphQL
requests only from hostnames specified using the
[`--host-whitelist`](../../../Reference/CLI/CLI-Syntax.md#host-whitelist) option. Besu accepts
incoming requests and connections from `localhost` and `127.0.0.1` by default.

If your application publishes RPC ports, specify the hostnames when starting Besu.

!!! example

```bash
besu --host-whitelist=example.com
```

Specify "*" for `--host-whitelist` to effectively disable host protection.

!!! caution
!!! caution

Specifying "*" for `--host-whitelist` is not recommended for production code.

## Not Supported by Besu

### Account Management
## Not supported by Besu

### Account management

Account management relies on private key management in the client which is not implemented by Besu.
Account management relies on private key management in the client, which is not supported by Besu.

Use [`eth_sendRawTransaction`](../../../Reference/API-Methods.md#eth_sendrawtransaction) to send signed transactions; `eth_sendTransaction` is not implemented.
To send signed transactions, use
[`eth_sendRawTransaction`](../../../Reference/API-Methods.md#eth_sendrawtransaction).
`eth_sendTransaction` is not implemented.

Use third-party wallets for [account management](../../Send-Transactions/Account-Management.md).
For [account management](../../Send-Transactions/Account-Management.md), use third-party wallets.

### Protocols

Expand Down
Loading