artofrf.com

Ali's Technology Blog

Menu
  • Home
  • Important Links
  • About Me
  • Tools and Scripts
Menu

Mist Access Point – CSV

Posted on February 9, 2022February 9, 2022 by mali

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.
Mist Access Point – Screen

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:

Mist Access Point Screen to CSV

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

Category: Juniper/Mist, Mist, Mist Wireless, Wireless

3 thoughts on “Mist Access Point – CSV”

  1. Micah Droessler says:
    December 28, 2022 at 4:33 pm

    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.

    Reply
    1. mali says:
      December 30, 2022 at 11:45 pm

      See if this works for ya:
      https://api.mist.com/api/v1/orgs/:org_id/devices/radio_macs

      Reply
  2. Courtney says:
    November 10, 2025 at 2:32 pm

    This 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.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • CLI to UI – Nile Guest APIs
  • Nile Secure Guest – Configuration and Use Case
  • WLAN Pros Toolbox
  • Nile does NAC – Configuring Trust Engine
  • WLAN Validator

Tags

#MFD9 - Juniper Presents AP W318 arista Arista AGNI Arista CV-CUE Arista Hospitality AP Arista NAC Arista presents at MFD9 Arista wall plate AP Arista WIPS Arista WPA3 UPSK Aruba Central Automation CWAP 403 EAP Format MAC Addresses Hamina Network Planner Juniper Mist show cloud-native NAC Juniper SRX300 Marvis MFD8 MFD9 MistAI Mist MPSK Mist Premium Analytics Mist Wireless NaaS Networking Field Day NFD32 Nile APIs NileNav Nile Secure Nile Wi-Fi Tech Field Day Troubleshooting with Marvis Troubleshooting with Mist Troubleshooting with Mist AI Troubleshooting with Wireshark True NaaS Wireless Adjuster Wireless Adjuster Level II Wireless troubleshooting WLPC wlpc2023 Wyebot

Tech Blogs

  • CCNA Wireless
  • Cisco Full Bars
  • Packet Life
  • The ASCII Construct
  • Juniper Port Checker
  • Bad-Fi
  • Gjermund Raaen
  • Havilandweb
  • WiFiTodd
  • BadgerWiFi
  • WiFrizzy
  • Spectrum Chart

Recent Comments

  • Hiten Thakkar on PCAP I/O Graph Analyzer
  • mali on Deploying Nile Secure – My First NSB
  • Larry Farrish on Deploying Nile Secure – My First NSB
  • Courtney on Mist Access Point – CSV
  • ayoub chabrouk on Ubiquiti stealing the show at MFD11

Archives

  • August 2026
  • July 2026
  • March 2026
  • February 2026
  • December 2025
  • November 2025
  • October 2025
  • August 2025
  • May 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • September 2023
  • August 2023
  • June 2023
  • May 2023
  • April 2023
  • February 2023
  • November 2022
  • October 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • May 2021
  • April 2021
  • March 2021
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • April 2019
  • March 2019
  • November 2018
  • October 2018
  • September 2018
  • May 2018
  • January 2018
  • December 2017
  • August 2017
  • January 2017
  • September 2014
  • December 2013
  • October 2013
  • May 2013
  • August 2012
  • July 2012

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Categories

  • AeroHive
  • Arista
  • Arista
  • Aruba
  • Aruba
  • Aruba Central
  • BYoD
  • Certifications
  • Cisco
  • Cisco
  • Cisco EEM Scripting
  • Cisco Routing
  • Cisco Security
  • Cisco VoIP
  • Cisco VPN
  • Cisco Wireless
  • Conferences and Meetings
  • Design
  • Ekahau
  • General
  • Hamina
  • IoT, IIoT, OT
  • Juniper Security
  • Juniper Switching
  • Juniper/Mist
  • Linux
  • Microsoft
  • Mist
  • Mist Wireless
  • Nile
  • Nile Secure
  • Nile Wi-Fi
  • Programming/Automation
  • Python
  • Ruckus
  • Ruckus Wireless
  • Ruckus/Brocade
  • Ruckus/Brocade Scripting
  • Ruckus/Brocade Switching
  • Secure Guest Service
  • Security
  • Switching
  • Tools
  • Troubleshooting
  • Trust Engine
  • Uncategorized
  • Windows
  • Wireless
  • Wireless
  • WLAN Tools
© 2026 artofrf.com | Powered by Minimalist Blog WordPress Theme