Get information about the peers of the node.
GEThttp://127.0.0.1:14265/api/core/v2/peers
Get information about the peers of the node.
Request
Responses
- 200
- 403
- 500
Successful operation.
- application/json
- Schema
- Example (from schema)
- default
Schema
- Array [
- ]
id stringrequired
The identifier of the peer.
multiAddresses string[]required
The addresses of the peer.
alias string
The alias of the peer.
relation stringrequired
Possible values: [known
, unknown
, autopeered
]
connected booleanrequired
Tells whether the peer is connected or not.
gossip Gossip
[
{
"id": "string",
"multiAddresses": [
"string"
],
"alias": "string",
"relation": "known",
"connected": true,
"gossip": {
"heartbeat": {
"solidMilestoneIndex": 0,
"prunedMilestoneIndex": 0,
"latestMilestoneIndex": 0,
"connectedNeighbors": 0,
"syncedNeighbors": 0
},
"metrics": {
"newBlocks": 0,
"knownBlocks": 0,
"receivedBlocks": 0,
"receivedBlockRequests": 0,
"receivedMilestoneRequests": 0,
"receivedHeartbeats": 0,
"sentBlocks": 0,
"sentBlockRequests": 0,
"sentMilestoneRequests": 0,
"sentHeartbeats": 0,
"droppedPackets": 0
}
}
}
]
[
{
"id": "12D3KooWMajsSUxSUFb3CRgmJvygYCGd27uMDdppVYNGud7xuKG5",
"multiAddresses": [
"/dns/abc.com/tcp/15602"
],
"alias": "abc",
"relation": "known",
"connected": true,
"gossip": {
"heartbeat": {
"solidMilestoneIndex": 61527,
"prunedMilestoneIndex": 61200,
"latestMilestoneIndex": 61527,
"connectedNeighbors": 5,
"syncedNeighbors": 7
},
"metrics": {
"newBlocks": 3799,
"knownBlocks": 554,
"receivedBlocks": 4370,
"receivedBlockRequests": 0,
"receivedMilestoneRequests": 1,
"receivedHeartbeats": 1,
"sentBlocks": 6,
"sentBlockRequests": 4325,
"sentMilestoneRequests": 31,
"sentHeartbeats": 9,
"droppedPackets": 0
}
}
},
{
"id": "12D3KooWNYDcJqxnWqCLSgeQKqNStwFUqHSJXPdSYTJnfxQESzie",
"multiAddresses": [
"/dns/xyz.com/tcp/15600"
],
"alias": "xyz",
"relation": "known",
"connected": true,
"gossip": {
"heartbeat": {
"solidMilestoneIndex": 61527,
"prunedMilestoneIndex": 56508,
"latestMilestoneIndex": 61527,
"connectedNeighbors": 5,
"syncedNeighbors": 6
},
"metrics": {
"newBlocks": 510,
"knownBlocks": 79,
"receivedBlocks": 589,
"receivedBlockRequests": 0,
"receivedMilestoneRequests": 1,
"receivedHeartbeats": 1,
"sentBlocks": 42,
"sentBlockRequests": 576,
"sentMilestoneRequests": 1,
"sentHeartbeats": 9,
"droppedPackets": 0
}
}
}
]
Unsuccessful operation: indicates that the endpoint is not available for public use.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 403,
"message": "not available for public use"
}
}
Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request.
- application/json
- Schema
- Example (from schema)
Schema
error objectrequired
{
"error": {
"code": 500,
"message": "internal server error"
}
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X GET 'http://127.0.0.1:14265/api/core/v2/peers' \
-H 'Accept: application/json'
ResponseClear