Hive Developer Portal
Methods:
Reports and controls P2P network connections for a hived node.
This API is only available when the network_node_api plugin is enabled.
It is intended for node operators and is not normally exposed by public API
endpoints.
network_node_api.add_node
Requests that the node add a peer endpoint to its P2P connection set.
This is a node-operator control method. The public api.hive.blog
endpoint did not have network_node_api enabled during verification, so
the example below reflects the source argument and return shape rather
than a live public-node response.
Query Parameters JSON
{"endpoint": "127.0.0.1:2001"}
Expected Response JSON
{}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"network_node_api.add_node", "params":{"endpoint":"127.0.0.1:2001"}, "id":1}' https://api.hive.blog
Query Parameters JSON
{}
Expected Response JSON
{
"connected_peers": [
{
"version": 0,
"host": "127.0.0.1:2001",
"info": {
"addr": "127.0.0.1:2001",
"peer": "example",
"direction": "outbound"
}
}
]
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"network_node_api.get_connected_peers", "params":{}, "id":1}' https://api.hive.blog
Query Parameters JSON
{}
Expected Response JSON
{
"listening_on": "0.0.0.0:2001",
"node_public_key": "STM1111111111111111111111111111111114T1Anm",
"node_id": "0000000000000000000000000000000000000000",
"firewalled": "unknown",
"connection_count": 8
}
Example curl
curl -s --data '{"jsonrpc":"2.0", "method":"network_node_api.get_info", "params":{}, "id":1}' https://api.hive.blog