Networking Operations
Add Peer
Add a peer to the list of known peers and attempt to connect to it. Password protected like the Debug Operations. POST only.
Request:
requestType
isaddPeer
peer
is the IP address or domain name of the peer (plus optional port)
Response: refer to Get Peer
isNewlyAdded
istrue
if the peer was not already known, omitted otherwise
Example: Refer to Add Peer example.
Blacklist API Proxy Peer
Blacklist a remote node from the UI, so it won't be used when in roaming and light client modes. POST only.
Request:
requestType
isblacklistAPIProxyPeer
peer
is the IP address or domain name of the peer (plus optional port)adminPassword
is a string with the admin password (optional)
Response:
done
(B) istrue
if the peer is blacklistedrequestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Blacklist API Proxy Peer example.
Blacklist Peer
Blacklist a peer for the default blacklisting period. Password protected like the Debug Operations. POST only.
Request:
requestType
isblacklistPeer
peer
is the IP address or domain name of the peer (plus optional port)
Response:
done
(B) istrue
if the peer is blacklistedrequestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Blacklist Peer example.
Get Inbound Peers
Get all peers that have sent a request to this peer in the last 30 minutes.
Request:
requestType
isgetInboundPeers
includePeerInfo
istrue
to include peer information, otherwise include only the address (optional)
Response:
peers
(A) is an array of peer addresses or peer objects (refer to Get Peer for details) depending onincludePeerInfo
requestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Inbound Peers example.
Get My Info
Get hostname and address of the requesting node.
Request:
requestType
isgetMyInfo
Response:
host
(S) is the node hostnameaddress
(S) is the node addressrequestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get My Info example.
Get Peer
Get information about a given peer.
Request:
requestType
isgetPeer
peer
is the IP address or domain name of the peer (plus optional port)
Response:
hallmark
(S) is the hex string of the peer's hallmark, if it is defineddownloadedVolume
(N) is the number of bytes downloaded by the peeraddress
(S) the IP address or DNS name of the peerweight
(N) is the peer's weight valueuploadedVolume
(N) is the number of bytes uploaded by the peerversion
(S) is the version of the software running on the peerplatform
(S) is a string representing the peer's platformlastUpdated
(N) is the timestamp (in seconds since the genesis block) of the last peer status updateblacklisted
(B) istrue
if the peer is blacklistedservices
(A) is an array of strings with the services the node providesblacklistingCause
(S) is the cause of blacklisting (ifblacklisted
istrue
)announcedAddress
(S) is the name that the peer announced to the network (could be a DNS name, IP address, or any other string)application
(S) is the name of the software applicationstate
(N) defines the state of the peer:0 for NON-CONNECTED
,1 for CONNECTED
, or2 for DISCONNECTED
shareAddress
(B) istrue
if the address is allowed to be shared with other peersinbound
(B) istrue
if the peer has made a request to this nodeinboundWebSocket
(B) istrue
if an inbound websocket has been established from this nodeoutboundWebSocket
(B) istrue
if an outbound websocket has been established to this nodelastConnectAttempt
(B) is the timestamp (in seconds since the genesis block) of the last connection attempt to the peerrequestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Peer example.
Get Peers
Get a list of peer IP addresses.
Request:
requestType
isgetPeers
active
istrue
for active (notNON-CONNECTED
) peers only (optional, iftrue
overridesstate
)state
is the state of the peers,NON-CONNECTED
,CONNECTED
, orDISCONNECTED
(optional)includePeerInfo
istrue
to include peer detail as in Get Peerservice
to filter on a specific service
Note: If neither active
nor state
is specified, all known peers are retrieved.
Response:
peers
(A) is an array of peer addressesrequestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Get Peers example.
Set API Proxy Peer
Set the remote node to use when in roaming and light client modes. POST only.
Request:
requestType
issetAPIProxyPeer
peer
is the IP address or domain name of the peer (plus optional port)adminPassword
is a string with the admin password (optional)
Response:
downloadedVolume
(N) is the number of bytes downloaded by the peeraddress
(S) the IP address or DNS name of the peerweight
(N) is the peer's weight valueuploadedVolume
(N) is the number of bytes uploaded by the peerversion
(S) is the version of the software running on the peerplatform
(S) is a string representing the peer's platformblockchainState
(S) is a string describing the state of the blockchain in the peerlastUpdated
(N) is the timestamp (in seconds since the genesis block) of the last peer status updateblacklisted
(B) istrue
if the peer is blacklistedservices
(A) is an array of strings with the services the node providesapiPort
(N) is the API access port of the peerapiSSLPort
(N) is the SSL API access port of the peerblacklistingCause
(S) is the cause of blacklisting (ifblacklisted
istrue
)announcedAddress
(S) is the name that the peer announced to the network (could be a DNS name, IP address, or any other string)application
(S) is the name of the software applicatiostate
(N) defines the state of the peer:0 for NON-CONNECTED
,1 for CONNECTED
, or2 for DISCONNECTED
shareAddress
(B) istrue
if the address is allowed to be shared with other peersinbound
(B) istrue
if the peer has made a request to this nodeinboundWebSocket
(B) istrue
if an inbound websocket has been established from this nodeoutboundWebSocket
(B) istrue
if an outbound websocket has been established to this nodelastConnectAttempt
(B) is the timestamp (in seconds since the genesis block) of the last connection attempt to the peerrequestProcessingTime
(N) is the API request processing time (in millisec)
Example: Refer to Set API Proxy Peer example.