Free tech learning for everyone, from basics to pro

Network AutomationProgramming and Application SecurityIntermediate

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.

How Meraki API calls are organisedOrganisationyour company accountNetworksone per siteDevicesby serial numberSettingsVLANs, SSIDs, ports, rules
Figure 1. Most calls start from the organisation, then drill down to networks and devices.

Getting started

  1. 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.
  2. Install the official library: pip install meraki.
  3. Store the key in an environment variable, never in your script. The library reads MERAKI_DASHBOARD_API_KEY automatically.
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

TaskWhy automate it
Inventory and licence reportExport every device, model, serial and firmware to a spreadsheet
Standard SSID settingsApply the same Wi-Fi settings to every site consistently
New site setupCreate networks, VLANs and port settings from a template
Offline device alertsCheck device status and post to a team chat
Firmware complianceList 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?
The same access as the dashboard admin account that created it, so it must be protected like a password.
Why should you test changes on one network first?
To catch mistakes before they are applied to every site at once.
How does the official meraki library find the API key without putting it in the script?
It reads it from the MERAKI_DASHBOARD_API_KEY environment variable.

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.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

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.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: