Meraki API - No Attributes

Solved
Alex-2021
Here to help

Meraki API - No Attributes

It seems no matter what script I run or what Python interpreter I run it I am getting no attributes for the specific parameter it is looking for. Below is the most simple request I can find - 

 

Script - 

 

import meraki

# Defining your API key as a variable in source code is not recommended
API_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
# Instead, use an environment variable as shown under the Usage section
# @ https://github.com/meraki/dashboard-api-python/

dashboard = meraki.DashboardAPI(API_KEY)

organization_id = 'XXXXXX'

response = dashboard.networks.getOrganizationNetworks(
organization_id
)

print(response)

 

Error - 


Message='Networks' object has no attribute 'getOrganizationNetworks'
response = dashboard.networks.getOrganizationNetworks(

 

I've confirmed the meraki module is installed and upgraded. The file it is looking within does exist as well. 

 

1 Accepted Solution
LearningIsFun
Getting noticed

The correct command:

 

response = dashboard.organizations.getOrganizationNetworks( organization_id, total_pages='all')

 

https://developer.cisco.com/meraki/api-latest/#!get-organization-networks

View solution in original post

2 Replies 2
LearningIsFun
Getting noticed

The correct command:

 

response = dashboard.organizations.getOrganizationNetworks( organization_id, total_pages='all')

 

https://developer.cisco.com/meraki/api-latest/#!get-organization-networks

@LearningIsFun, that was it! much appreciated! 

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.