All URIs are relative to /
Method | HTTP request | Description |
---|---|---|
entry_nodes | GET /api/v3/node/entryNodes | List all known entry nodes with multiaddrs and eligibility. |
info | GET /api/v3/node/info | Get information about this HOPR Node. |
metrics | GET /api/v3/node/metrics | Retrieve Prometheus metrics from the running node. |
peers | GET /api/v3/node/peers | Lists information for `connected peers` and `announced peers`. |
version | GET /api/v3/node/version | Get release version of the running node. |
dict(str, EntryNode) entry_nodes()
List all known entry nodes with multiaddrs and eligibility.
List all known entry nodes with multiaddrs and eligibility.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.NodeApi(hoprd_sdk.ApiClient(configuration))
try:
# List all known entry nodes with multiaddrs and eligibility.
api_response = api_instance.entry_nodes()
pprint(api_response)
except ApiException as e:
print("Exception when calling NodeApi->entry_nodes: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NodeInfoResponse info()
Get information about this HOPR Node.
Get information about this HOPR Node.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.NodeApi(hoprd_sdk.ApiClient(configuration))
try:
# Get information about this HOPR Node.
api_response = api_instance.info()
pprint(api_response)
except ApiException as e:
print("Exception when calling NodeApi->info: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str metrics()
Retrieve Prometheus metrics from the running node.
Retrieve Prometheus metrics from the running node.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.NodeApi(hoprd_sdk.ApiClient(configuration))
try:
# Retrieve Prometheus metrics from the running node.
api_response = api_instance.metrics()
pprint(api_response)
except ApiException as e:
print("Exception when calling NodeApi->metrics: %s\n" % e)
This endpoint does not need any parameter.
str
- Content-Type: Not defined
- Accept: text/plain, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NodePeersResponse peers(quality=quality)
Lists information for connected peers
and announced peers
.
Lists information for connected peers
and announced peers
. Connected peers are nodes which are connected to the node while announced peers are nodes which have announced to the network. Optionally pass quality
parameter to get only peers with higher or equal quality to the specified value.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.NodeApi(hoprd_sdk.ApiClient(configuration))
quality = 1.2 # float | (optional)
try:
# Lists information for `connected peers` and `announced peers`.
api_response = api_instance.peers(quality=quality)
pprint(api_response)
except ApiException as e:
print("Exception when calling NodeApi->peers: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
quality | float | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NodeVersionResponse version()
Get release version of the running node.
Get release version of the running node.
from __future__ import print_function
import time
import hoprd_sdk
from hoprd_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_token
configuration = hoprd_sdk.Configuration()
configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# create an instance of the API class
api_instance = hoprd_sdk.NodeApi(hoprd_sdk.ApiClient(configuration))
try:
# Get release version of the running node.
api_response = api_instance.version()
pprint(api_response)
except ApiException as e:
print("Exception when calling NodeApi->version: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]