admin_peers
The peers administrative property can be queried for all the information known about the connected remote nodes at the networking granularity. These include general information about the nodes themselves as participants of the devp2p P2P overlay protocol, as well as specialized information added by each of the running application protocols.
JSONRPC: admin_peers
Request
- application/json
Body
Default value: admin_peers
Method name
Default value: 1
Request ID, Random or Auto incrementation
Default value: 2.0
JSON-RPC Version (2.0)
Responses
- 200
The information about all connected peers.
- application/json
- Schema
- Example (from schema)
Schema
Default value: 2.0
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
| code | message | description | |-----|-----|-------| | -32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. | |-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
The information about all connected peers.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": [
{
"id": "144af69d2bb030c6a2a5ceee7445dc613e200f19358547cffc353d56e6c8a5b4186a6953c028b6afd0ab3c2bfc4c86f24b0bf855d0686b964ec65cefd3deec37",
"name": "Klaytn/vvX.X.X/XXXX-XXXX/goX.X.X",
"caps": [
"istanbul/64"
],
"network": {
"localAddress": "10.0.10.1:49355",
"remoteAddress": "10.0.0.1:32323",
"inbound": false,
"trusted": false,
"static": true
},
"protocols": {
"istanbul": {
"version": 64,
"difficulty": 1285901,
"head": "0x2d04ac52df4af08a9a0e15d5939c29decb00031e7b3f6abd05bc0c731f6b5561"
}
}
},
{
"id": "a875620f67f0b12edb97d0ec269e7940f2505b1f62576f39858c37e1d7f956318c3a619239f03f806a79ccaa8e7e9b5def343c24a9fd2e9d715964e0952dd995",
"name": "Klaytn/vvX.X.X/XXXX-XXXX/goX.X.X",
"caps": [
"istanbul/64"
],
"networks": [
{
"localAddress": "10.0.10.2:49353",
"remoteAddress": "10.0.0.2:32323",
"inbound": false,
"trusted": false,
"static": true
}
],
"protocols": {
"istanbul": {
"version": 64,
"difficulty": 1285901,
"head": "0x2d04ac52df4af08a9a0e15d5939c29decb00031e7b3f6abd05bc0c731f6b5561"
}
}
},
{
"id": "e18d6d4e0ffac0a51028a8d49a548295ac8ac50d064f3581600799a3ae761a61f0b39c38b4195e163e01f30db616debf61b5b2ddea716bc8fb1c907ce7a1de26",
"name": "Klaytn/vvX.X.X/XXXX-XXXX/goX.X.X",
"caps": [
"istanbul/64"
],
"network": {
"localAddress": "10.0.10.3:49354",
"remoteAddress": "10.0.0.3:32323",
"inbound": false,
"trusted": false,
"static": true
},
"protocols": {
"istanbul": {
"version": 64,
"difficulty": 1285900,
"head": "0x2e228a45c7c9b9e6729b6c66b31957d6cb62ce53e32cedf156615a4e8a2e253a"
}
}
}
]
}