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:
requestTypeisaddPeerpeeris the IP address or domain name of the peer (plus optional port)
Response: refer to Get Peer
isNewlyAddedistrueif 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:
requestTypeisblacklistAPIProxyPeerpeeris the IP address or domain name of the peer (plus optional port)adminPasswordis a string with the admin password (optional)
Response:
done(B) istrueif 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:
requestTypeisblacklistPeerpeeris the IP address or domain name of the peer (plus optional port)
Response:
done(B) istrueif 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:
requestTypeisgetInboundPeersincludePeerInfoistrueto 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 onincludePeerInforequestProcessingTime(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:
requestTypeisgetMyInfo
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:
requestTypeisgetPeerpeeris 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) istrueif the peer is blacklistedservices(A) is an array of strings with the services the node providesblacklistingCause(S) is the cause of blacklisting (ifblacklistedistrue)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 DISCONNECTEDshareAddress(B) istrueif the address is allowed to be shared with other peersinbound(B) istrueif the peer has made a request to this nodeinboundWebSocket(B) istrueif an inbound websocket has been established from this nodeoutboundWebSocket(B) istrueif 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:
requestTypeisgetPeersactiveistruefor active (notNON-CONNECTED) peers only (optional, iftrueoverridesstate)stateis the state of the peers,NON-CONNECTED,CONNECTED, orDISCONNECTED(optional)includePeerInfoistrueto include peer detail as in Get Peerserviceto 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:
requestTypeissetAPIProxyPeerpeeris the IP address or domain name of the peer (plus optional port)adminPasswordis 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) istrueif 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 (ifblacklistedistrue)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 DISCONNECTEDshareAddress(B) istrueif the address is allowed to be shared with other peersinbound(B) istrueif the peer has made a request to this nodeinboundWebSocket(B) istrueif an inbound websocket has been established from this nodeoutboundWebSocket(B) istrueif 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.