As others have mentioned, the API is probably the right way to do this. # Meraki library : pip install meraki : https://developer.cisco.com/meraki/api/#/python/getting-started
import meraki
import logging, sys, getopt
loggingEnabled = True
def main(argv):
print("Meraki Library version: ")
print(meraki.__version__)
arg_APIKey = "xxx"
arg_orgID = "xxx"
# Create Meraki Client Object and initialise
client = meraki.DashboardAPI(api_key=arg_APIKey)
# orgs = client.organizations.getOrganizations()
# get Networks
networks = client.organizations.getOrganizationNetworks(organizationId=arg_orgID)
for network in networks:
try:
deviceList = client.sm.getNetworkSmDevices(networkId=network["id"])
except meraki.APIError as e:
print("Not an SM network")
print(deviceList)
if __name__ == '__main__':
main(sys.argv[1:]) You'll need three things for this to work: The Meraki Library Installed. Your Organization ID Your API key All of this is covered here: https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API The above script needs editing with the API key and the Organization ID, and will export to the interface all the details that you want. The API does take optional extras: def getNetworkSmDevices(self, networkId: str, total_pages: int = 1, direction: str = 'next', **kwargs: Any) -> Any List the devices enrolled in an SM network with various specified fields and filters https://developer.cisco.com/meraki/api-v1/#!get-network-sm-devices networkId (string): (required) total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages direction (string): direction to paginate, either "next" (default) or "prev" page fields (array): Additional fields that will be displayed for each device. The default fields are: id, name, tags, ssid, wifiMac, osName, systemModel, uuid, and serialNumber. The additional fields are: ip, systemType, availableDeviceCapacity, kioskAppName, biosVersion, lastConnected, missingAppsCount, userSuppliedAddress, location, lastUser, ownerEmail, ownerUsername, osBuild, publicIp, phoneNumber, diskInfoJson, deviceCapacity, isManaged, hadMdm, isSupervised, meid, imei, iccid, simCarrierNetwork, cellularDataUsed, isHotspotEnabled, createdAt, batteryEstCharge, quarantined, avName, avRunning, asName, fwName, isRooted, loginRequired, screenLockEnabled, screenLockDelay, autoLoginDisabled, autoTags, hasMdm, hasDesktopAgent, diskEncryptionEnabled, hardwareEncryptionCaps, passCodeLock, usesHardwareKeystore, androidSecurityPatchVersion, and url. wifiMacs (array): Filter devices by wifi mac(s). serials (array): Filter devices by serial(s). ids (array): Filter devices by id(s). scope (array): Specify a scope (one of all, none, withAny, withAll, withoutAny, or withoutAll) and a set of tags. perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000. startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it. endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
... View more