cURL
curl --request POST \
--url https://api.example.com/network_info \
--header 'Content-Type: application/json' \
--data '
{
"method": "network_info",
"params": null,
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({method: 'network_info', params: null, id: 'dontcare', jsonrpc: '2.0'})
};
fetch('https://api.example.com/network_info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/network_info"
payload = {
"method": "network_info",
"params": None,
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"active_peers": [
{
"id": "<string>",
"account_id": "<string>",
"addr": "<string>"
}
],
"known_producers": [
{
"account_id": "<string>",
"peer_id": "<string>",
"addr": "<string>"
}
],
"num_active_peers": 1,
"peer_max_count": 1,
"received_bytes_per_sec": 1,
"sent_bytes_per_sec": 1
},
"id": "<string>",
"jsonrpc": "<string>"
}Post network info
Queries the current state of node network connections. This includes information about active peers, transmitted data, known producers, etc.
POST
/
network_info
cURL
curl --request POST \
--url https://api.example.com/network_info \
--header 'Content-Type: application/json' \
--data '
{
"method": "network_info",
"params": null,
"id": "dontcare",
"jsonrpc": "2.0"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({method: 'network_info', params: null, id: 'dontcare', jsonrpc: '2.0'})
};
fetch('https://api.example.com/network_info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/network_info"
payload = {
"method": "network_info",
"params": None,
"id": "dontcare",
"jsonrpc": "2.0"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"result": {
"active_peers": [
{
"id": "<string>",
"account_id": "<string>",
"addr": "<string>"
}
],
"known_producers": [
{
"account_id": "<string>",
"peer_id": "<string>",
"addr": "<string>"
}
],
"num_active_peers": 1,
"peer_max_count": 1,
"received_bytes_per_sec": 1,
"sent_bytes_per_sec": 1
},
"id": "<string>",
"jsonrpc": "<string>"
}Body
application/json
Was this page helpful?