To use this example, please enable API using this guide and install dependencies for it:

sudo apt-get install -y python3-requests

And then download fastnetmon_api_client.py file from GitHub:

wget https://raw.githubusercontent.com/FastNetMon/fastnetmon-example-api-client-python-networks/main/fastnetmon_api_client.py

Enable execution flag:

chmod +x fastnetmon_api_client.py

And run it this way:

./fastnetmon_api_client.py

Valid output looks like:

Add random network: 114.123.112.50/22
Correctly added new subnet
Networks list with new network: {u'values': [u'114.123.112.50/22'], u'error_text': u'', u'success': True}
Correctly removed new subnet

24/7 Tech Support

support@fastnetmon.com

Email Us

sales@fastnetmon.com