Hi All
Looks to pull all my networks but only want the id and name to be printed. Here is what I have:
import meraki
from pprint import pprint
# Defining your API key as a variable in source code is discouraged.
# This API key is for a read-only docs-specific environment.
# In your own code, use an environment variable as shown under the Usage section
# @ https://github.com/meraki/dashboard-api-python/
API_KEY = ''
dashboard = meraki.DashboardAPI(API_KEY, suppress_logging=True)
organization_id = ''
response = dashboard.organizations.getOrganizationNetworks(
organization_id, total_pages='all'
)
fields = [id, name]
for field in fields:
pprint (f"{field}: {response[field]}")
Suggestions...keep getting error about the fields = [id, name]
Traceback (most recent call last):
File "/mnt/m2ssd/python/meraki_get_network_id.py", line 19, in <module>
fields = [id, name]
^^^^
NameError: name 'name' is not defined