Looping API using names not ID's

Getting noticed

Looping API using names not ID's


I'm new to Meraki API but I'm starting to get familiar.

I have lots of organisations that I'd like to start using the API calls with.


At the moment I have to make a call to locate all the organisation ID, then another call to obtain the networks.


I'd like to make a single looped call and just use the network name.

Or I'd like to find all SSID's within all org's or just one org based on name only.


Has anyone been doing similar things?



Getting noticed

You can do this with simple for loops and matching logic. ie:


m = meraki.DashboardAPI(api_key)
orgs = m.organizations.getOrganizations()


for org in orgs:

    networks = m.organizations.getOrganizationNetworks(org['id'])

    for network in networks:

        if "networkName" in network['name']:

            do something....


This is basic flow control (nested loops) that will allow you to find what you are looking for.  This method is slow but its more to give you the idea then good code to use.

Getting noticed


Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.