Automating Cisco Meraki with the Dashboard API and Python
In short: Cisco Meraki devices are managed from the cloud, and the Dashboard API lets scripts do what the web dashboard does. Using the official meraki Python library, you authenticate with an API key, list organisations, networks and devices, and read or change settings such as SSIDs and VLANs. Protect API keys, respect rate limits and test changes on one network first.
Cloud-managed networks and APIs
With Cisco Meraki, switches, access points, firewalls and cameras are configured from a cloud dashboard instead of each device's CLI. Everything in the dashboard is also available through the Dashboard API, a REST API. That makes Meraki one of the easiest platforms to automate: there is no SSH or screen-scraping, just API calls returning JSON. REST concepts are explained in REST APIs for network engineers.
Getting started
- An administrator enables API access for the organisation and generates an API key in their dashboard profile. The key has the same rights as that admin account.
- Install the official library:
pip install meraki. - Store the key in an environment variable, never in your script. The library reads
MERAKI_DASHBOARD_API_KEYautomatically.
import meraki
dashboard = meraki.DashboardAPI(suppress_logging=True)
for org in dashboard.organizations.getOrganizations():
print("Org:", org["name"], org["id"])
for net in dashboard.organizations.getOrganizationNetworks(org["id"]):
print(" Network:", net["name"])
for dev in dashboard.organizations.getOrganizationDevices(org["id"]):
print(" Device:", dev.get("name"), dev["model"], dev["serial"])
Making changes safely
The same library can update settings, for example renaming an SSID or changing a VLAN. Before running changes across many networks:
- Read first: save the current settings as a backup before changing them.
- Test on one network, ideally a lab or small site, then roll out in batches (see safe automated changes).
- Use a dedicated admin account for automation, with only the rights it needs, so its key can be revoked separately.
- Respect rate limits: the API limits how many calls each organisation can make per second. The official library retries automatically when it is told to slow down.
Useful automation ideas
| Task | Why automate it |
|---|---|
| Inventory and licence report | Export every device, model, serial and firmware to a spreadsheet |
| Standard SSID settings | Apply the same Wi-Fi settings to every site consistently |
| New site setup | Create networks, VLANs and port settings from a template |
| Offline device alerts | Check device status and post to a team chat |
| Firmware compliance | List devices not on the approved firmware version |
Real-world example: 40 cafés, one script
A fictional café chain runs Meraki at 40 sites. Head office wants the guest Wi-Fi password changed every month, which used to take an engineer most of a morning in the dashboard. A short Python script now reads the new password from the company's secrets manager, finds the guest SSID in each network and updates it, logging every change. It runs first on the head office network, then on all cafés in batches of ten. The monthly change now takes five minutes, and a report confirms every site was updated.
Practice
What does a Meraki API key allow?
Why should you test changes on one network first?
How does the official meraki library find the API key without putting it in the script?
Key takeaways
- The Meraki Dashboard API exposes everything the dashboard can do.
- Use the official meraki Python library and an API key from an environment variable.
- Calls follow organisations, then networks, then devices.
- Back up settings, test on one network and roll out in batches.
- Use a dedicated admin account and respect rate limits.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.