Currently Mist dashboard allows yours to download the Access Point inventory. This is not the case when you are under the Access Point screen and want to download the Access Point names along with all the columns shown. There are about 67 columns available; I like to primarily utilize the following columns:
- Status
- Name
- MAC
- IP
- No. Clients
- Uptime
- Total Bytes
- Capabilities
- VBLE
- 2.4 GHz channel
- 5 GHz channel
- 2.4 GHz BSSID
- 5 GHz BSSID
- 2.4 GHz TXPower
- 5 GHz TX Power
- LLDP Port ID
- LLDP Name (If there are multiple switches)
- Depending on my need I sometimes change these.

When I need to download this there are no options for me, other than to highlight, copy and then paste into an excel document. This is not a fun task, but Mist APIs make it fun. So I decided to use the Mist APIs. Following script allowed me to do a GET and then filter the results into a CSV file.
import os
import requests
import csv
##########################
#GET AP List from the Access Point section and extract needed keywords in the CSV File
site_id = 'SITE-ID-GOES-HERE'
url = 'https://api.mist.com/api/v1/sites/'+ site_id +'/devices/search'
api_key = os.environ.get('mist_apikey')
headers = {
'Content-Type': 'application/json',
'Authorization': api_key
}
def get_ap_list():
results = requests.get(url, headers=headers)
data = results.json()
filter_data = (data['results'])
for i in filter_data:
ap_dict = (i['last_hostname'],i['lldp_port_id'],i['model'],i['lldp_system_name'],i['mac'])
print(ap_dict)
header_row = ['HostName','Port ID','Model','LLDP Neighbor','MAC']
with open('myapfile.csv', 'w') as csvfile:
writer = csv.writer(csvfile)
writer.writerow(header_row)#adding this before the loop will not insert it after each line
for i in filter_data:
writer.writerow((i['last_hostname'],i['lldp_port_id'],i['model'],i['lldp_system_name'],i['mac'],i[]))
if __name__ == "__main__":
get_ap_list()
That’s about it; here are the results:

This can easily be modified to print and download whichever options are needed.

Hello, this is some great stuff, thank you for posting. I do have a question I am trying to get to the 2.4 and 5 ghz
bssids and am having trouble finding the correct name from the API. I can find BSSID when in a client generated log but not just the base Mac address for the BSSID so I can get all 16 of them per radio.
I also had to make a little change to get the bearer token to work. ‘Authorization’: ‘Token {}’.format(api_key)
Can you help me find those bssids?
Thanks much.
See if this works for ya:
https://api.mist.com/api/v1/orgs/:org_id/devices/radio_macsThis was very helpful. I too was looking to get the BSSID info and it was for e911 purposes. I ended up using two api calls. The first one to get all the APs using get sites//stats/devices, looping it, and calling a function that appends the mac to a get sites/stats/devices/. I was able to parse for the three bands for their base bssid [radio_stat][band_5][mac]. I then swapped out the last character of the base bssid with characters 1 – f.