Peers
Get information about the peers of the node.
Responses
200
Successful operation.
application/json
403
Unsuccessful operation: indicates that the endpoint is not available for public use.
application/json
500
Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request.
application/json
get
GET /api/core/v2/peers HTTP/1.1
Host: iota.nownodes.io
Accept: */*
[
{
"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
}
}
}
]
Add a given peer to the node.
Body
Adds a given peer to the node.
multiAddressstringRequired
aliasstringOptional
Responses
200
Successful operation.
application/json
403
Unsuccessful operation: indicates that the endpoint is not available for public use.
application/json
404
Unsuccessful operation: indicates that the requested data was not found.
application/json
500
Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request.
application/json
post
POST /api/core/v2/peers HTTP/1.1
Host: iota.nownodes.io
Content-Type: application/json
Accept: */*
Content-Length: 116
{
"multiAddress": "/dns/abc.com/tcp/15602/p2p/12D3KooWMajsSUxSUFb3CRgmJvygYCGd27uMDdppVYNGud7xuKG5",
"alias": "abc.com"
}
{
"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
}
}
}
Get information about a given peer.
Path parameters
peerIdstringRequiredExample:
Identifier of the block.
12D3KooWMajsSUxSUFb3CRgmJvygYCGd27uMDdppVYNGud7xuKG5
Responses
200
Successful operation.
application/json
400
Unsuccessful operation: indicates that the provided data is invalid.
application/json
403
Unsuccessful operation: indicates that the endpoint is not available for public use.
application/json
404
Unsuccessful operation: indicates that the requested data was not found.
application/json
500
Unsuccessful operation: indicates that an unexpected, internal server error happened which prevented the node from fulfilling the request.
application/json
get
GET /api/core/v2/peers/{peerId} HTTP/1.1
Host: iota.nownodes.io
Accept: */*
{
"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
}
}
}