- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We Have 2500+ networks - API call only sends back 1000 ? Yet its only 1 API call?
Hi,
Simple script below.
I send a call I assume once. Therefore well within the limit? Yet only get the first 1000 networks yet we have 2500+.
Is this correct? Do I need to take a different approach?
Help appreciated.
thanks
Aidan
import requests
import json
import time
import datetime
# import system
now = datetime.datetime.now()
# Define variables
API_KEY = 'xxx'
MERAKI_URL = 'https://api.meraki.com/api/v1/'
ORG_KEY = 'xxx'
headers = {'X-Cisco-Meraki-API-Key': API_KEY}
def main(i=0):
# ************** GET the current list of networks
NETWORKS = '/organizations/' + ORG_KEY + '/networks'
NETWORK_list = requests.get(MERAKI_URL + NETWORKS, headers=headers)
print(NETWORK_list)
Solved! Go to solution.
- Labels:
-
Dashboard API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aidan,
Don't worry, this is normal expected behaviour from the API as there is a limit of 1000 for entries returned. This has been discussed a few times on the community before so here are some links for you to gain a better understanding and find a solution:
https://community.meraki.com/t5/Developers-APIs/Limited-search/m-p/102863
Essentially, you will need to make a 2nd and 3rd API call and define a new starting point in order to obtain all of the networks. Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Aidan,
Don't worry, this is normal expected behaviour from the API as there is a limit of 1000 for entries returned. This has been discussed a few times on the community before so here are some links for you to gain a better understanding and find a solution:
https://community.meraki.com/t5/Developers-APIs/Limited-search/m-p/102863
Essentially, you will need to make a 2nd and 3rd API call and define a new starting point in order to obtain all of the networks. Hope this helps!
