Besu JSON-RPC API reference
The Besu JSON-RPC API methods are grouped by namespace:
| Namespace | Description |
|---|---|
ADMIN | Administrative functionality to manage your node. |
DEBUG | Inspect and debug the network. |
ETH | Interact with the blockchain, including querying blocks, transactions, logs, and account state. |
MINER | Control the node's block creation settings. |
NET | Network-related information. |
PLUGINS | Plugin-related functionality. |
TRACE | Concise alternative to the DEBUG API for tracing transactions. |
TXPOOL | Inspect the contents of the transaction pool. |
WEB3 | Functionality for the Ethereum ecosystem. |
Important
- This reference contains API methods that apply to both public and private networks. For private-network-specific API methods, see the private network API reference.
- All JSON-RPC HTTP examples use the default host and port endpoint
http://127.0.0.1:8545. If using the --rpc-http-host or --rpc-http-port options, update the endpoint. - Most example requests are made against private networks. Depending on network configuration and activity, your example results might be different.
Miscellaneous methods
rpc_modules
Lists enabled APIs and the version of each.
Parameters
- None
Returns
- Enabled APIs and their versions.
- curl HTTP request
- wscat WS request
- JSON result
curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "rpc_modules",
"params": [],
"id": 1
}'
{
"jsonrpc": "2.0",
"method": "rpc_modules",
"params": [],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"web3": "1.0",
"eth": "1.0",
"net": "1.0"
}
}