cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8590
Views
17
Helpful
3
Replies

Meraki Dashboard API Confusion

tony.andreoli
Level 1
Level 1

Trying to get a list of devices through the Meraki dashboard API, however the list returns a 200 return code but no items.  If I go into the dashboard website I see devices.  What am I doing wrong?  I'm doing:

To get Organization code:

curl -L -H 'X-Cisco-Meraki-API-Key: <myKey>' -X GET -H 'Content-Type: application/json' 'https://dashboard.meraki.com/api/v0/organizations'


To get list of Networks ID's:

curl -L -H 'X-Cisco-Meraki-API-Key: <myKey>' -X GET -H 'Content-Type: application/json' 'https://dashboard.meraki.com/api/v0/organizations/<myOrgID>/networks'

To prove the correct Network ID:

curl -L -H 'X-Cisco-Meraki-API-Key: <key>' -X GET -H 'Content-Type: application/json' 'https://dashboard.meraki.com/api/v0/organizations/<myOrgID>/networks/<myNetworkID>'

and this correctly displays the network details

To get device list from this network:

curl -L -H 'X-Cisco-Meraki-API-Key: <myKey>' -X GET -H 'Content-Type: application/json' 'https://dashboard.meraki.com/api/v0/networks/<myNetworkID>/devices'

However this comes back with no entries and a 200 return code.

Thanks for any help.

1 Accepted Solution

Accepted Solutions

Michael,

I believe that API endpoint only returns a list of *Meraki* devices within a network (switches, firewalls, APs, etc). If the network is *only* used for Systems Manager, then there are no Meraki devices and thus an empty list is returned.

Per the API, it looks like the endpoint you probably want is:

     /networks/[network_id]/sm/devices

In the API docs, look under the "SM" heading

View solution in original post

3 Replies 3

colo
Cisco Employee
Cisco Employee

Tony,

I copied and pasted your curl statements and added my API key, but I saw no issues. I suggest trying with Postman (getpostman.com) just to check. If you still have a problem, please report it to the Meraki support team.

https://meraki.cisco.com/support/

Thanks,

Colin

I have the same issue. When i try to load the list of devices, i get a 200 but an empty list. Response: []

Im able to read organizations and groups, but not the devices for a group.

i can not see what wrong, because if a change the group id to an invalid value, i get a 404 as expected.

Reading the network is no problem:

Bildschirmfoto 2017-06-13 um 13.21.22.png

Reading devices fails:

Bildschirmfoto 2017-06-13 um 13.21.44.png

On the console, i can see an active device:

Bildschirmfoto 2017-06-13 um 13.25.39.png

Michael,

I believe that API endpoint only returns a list of *Meraki* devices within a network (switches, firewalls, APs, etc). If the network is *only* used for Systems Manager, then there are no Meraki devices and thus an empty list is returned.

Per the API, it looks like the endpoint you probably want is:

     /networks/[network_id]/sm/devices

In the API docs, look under the "SM" heading

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: