Cannot get list of devices

Comes here often

Cannot get list of devices



I'm trying to implement the meraki api, I can get everything else such as list of Orgs, admins within an Org, etc. However cant get list of devices as it returns empty even though there are devices visible on the dashboard.

So, this is working with same header (X-Cisco-Meraki-API-Key):




But these are not even though the header x-cisco is the same:




So what am I missing? Thanks

4 Replies 4
Kind of a big deal
Kind of a big deal

Which error-code do you get?

Oh, just see, an empty list and no errors ... Have you tried a different API user and see if that works? What are the permissions for this particular user?

Kind of a big deal

looks like the networkID is missing...







Kind of a big deal
Kind of a big deal

The best way to test the endpoints is to do a GET via a browser.  Log to your Org , open a new chrome tab and do a GET ( just put the URL in the URL bar ) 


Eg : 




you don't have to deal with headers and everything. Once the endpoint is working , you can now include it in your Scripts


My header always looks like that ( Python 😞 



apikey = "XXXXXXXXXXX" #Your API Key
headers = {
	'x-cisco-meraki-api-key': format(str(apikey)),
	'Content-Type': 'application/json'



Building a reputation

You are right to think something isn't adding up here. If you are able to draw in the admins then the access type is correct and shouldn't matter. 


What are you using to access the API? For example with python you can create a loop as an alternative quick fix and use the following call:!get-network-devices


How many devices do you have in your organization? It is possible that with many devices you need to employ pagination. 


Are you using v0 of the API? This could also be the root of the problem.

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.