C9800 can be accessed from RESTCONF using YANG model. But YANG model is very difficult to find the correct url and parameters. So I created the C9800 API wrapper. This is useful for the c9800 API beginner because you don't have to care about IOS-XE YANG model.
git clone https://github.com/dmatsumu/c9800-RESTCONF
cd c9800-RESTCONF
pip install virtualenv
python3 -m venv .
source ./bin/activate
You need to input parameter into "config.json" file according to your environment.
You need to import "getApInfo.py" into your python code. Please refer to the sample_code.py, if you need a sample.
display APs under the WLC
display WLANs under the WLC
display AP radio operation info from "Cisco-IOS-XE-wireless-access-point-oper:radio-oper-data"
display AP operation info from "Cisco-IOS-XE-wireless-access-point-oper:oper-data"
display AP MAC address from "Cisco-IOS-XE-wireless-access-point-oper:ap-name-mac-map"
display WLAN ID from "Cisco-IOS-XE-wireless-wlan-cfg:wlan-cfg-entry"
display ssid counters info from "Cisco-IOS-XE-wireless-access-point-oper:ssid-counters"
display CAPWAP info from "Cisco-IOS-XE-wireless-access-point-oper:capwap-data"
display RRM operation info from "Cisco-IOS-XE-wireless-rrm-oper:rrm-oper-data"
dispaly AP summary info from many sources with AP name and radio slot number
dispaly AP summary info from many sources with AP name ONLY
- This python code is build in my lab environment. Please note that errors may occur depending on the environment.
- If you want to use "ssid-counters", you need to edit your c9800's AP join profile configuration according to the following.
no statistics traffic-distribution
bssid-stats
bssid-stats bssid-stats-frequency 30
- Client information will be created soon(maybe).