Debug API
Now that you have created your Swarm wallet and your Bee node has begun to participate in the global Swarm network, we can use the Debug API to take a closer look at what's happening with your node.
The Debug API provides a privileged environment where you are able to interact with your Bee node to get more information about the status of your node.
danger
Never expose your Debug API to the public Internet, make sure to use a firewall or bind to localhost, as we have in the example below.
To use the Debug API we must first configure Bee to enable it, as it is disabled by default.
#
Checking ConnectivityFirst, let's check how many nodes we are currently connected to.
Great! We can see that we are currently connected and sharing data with 23 other nodes!
info
Here we are using the jq
command line utility to count the amount of objects in the peers
array in the JSON response we have received from our Debug API, learn more about how to install and use jq
here.
#
Inspect Network TopologyWe can gain even more insight into how your Bee is becoming a part of
the global network using the topology
endpoint.
In this example, our node is beginning to form a healthy network. We hope to see our node adding and connecting to nodes in as many bins as possible. Learn more about proximity order bins and how your Bee node becomes part of the ordered p2p network in
The Book of Swarm .Find out more about what you can do with the Debug API here.