04-16-2017 05:58 PM - edited 03-01-2019 03:42 AM
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.
Solved! Go to Solution.