Get information about the peers of the node.
GET/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 [
- ]
The identifier of the peer.
The addresses of the peer.
The alias of the peer.
Possible values: [known
, unknown
, autopeered
]
Tells whether the peer is connected or not.
gossip Gossip
Information about the gossip stream with the peer.
heartbeat Heartbeatnullablerequired
Information about the most recent heartbeat of the peer. The heartbeat is null
if none has been received yet.
The most recent milestone that has been solidified by the node.
Tells from which starting point the node holds data.
The most recent milestone known to the node.
Tells how many connected peers the node has.
Tells how many synced peers the node has.
metrics Metricsrequired
Metrics about the gossip stream with the peer.
The number of received blocks that were new for the node.
The number of received blocks that already were known to the node.
The number of received blocks from the peer.
The number of received block requests from the peer.
The number of received milestone requests from the peer.
The number of received heartbeats from the peer.
The number of sent blocks to the peer.
The number of sent block requests to the peer.
The number of sent milestone requests to the peer.
The number of sent heartbeats to the peer.
The number of dropped packets.
[
{
"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
The application error code.
The error reason.
{
"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
The application error code.
The error reason.
{
"error": {
"code": 500,
"message": "internal server error"
}
}