cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
341
Views
0
Helpful
1
Replies

How to get APname through API ?

yogapriya
Level 1
Level 1

we want to fetch APname which API we need to use?

1 Reply 1

Marcel Zehnder
Spotlight
Spotlight

Hi, assuming you use WLC, you can use for example this RESTCONF endpoint:
https://{{WLC}}/restconf/data/Cisco-IOS-XE-wireless-access-point-oper:access-point-oper-data/ap-name-mac-map

This will generate this report:

 

{
    "Cisco-IOS-XE-wireless-access-point-oper:ap-name-mac-map": [
        {
            "wtp-name": "001-1-AP01",
            "wtp-mac": "08:96:xx:xx:xx:xx",
            "eth-mac": "84:3d:xx:xx:xx:xx"
        },
        {
            "wtp-name": "001-1-AP02",
            "wtp-mac": "08:96:ad:xx:xx:xx",
            "eth-mac": "84:3d:c6:xx:xx:xx"
        },
       <SNIP>
  ]
}
  
      

 

In your call you need basic auth and the header for yang-data+json:

 

curl -u "user:password" \
	-H "Accept: application/yang-data+json" \
	https://WLC_IP_OR_HOSTNAME/restconf/data/Cisco-IOS-XE-wireless-access-point-oper:access-point-oper-data/ap-name-mac-map

 

 

 

HTH