Cannot get list of devices

SOLVED
MW3
Here to help

Cannot get list of devices

Hi,

 

Im trying to implement the api, I can get everything else such as list of Orgs, admins within an Org, 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😞

{{baseUrl}}/organizations/{Org-ID}/admins

 

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

{{baseUrl}}/organizations/{Org-ID}/inventory
{{baseUrl}}/organizations/{Org-ID}/deviceStatuses
{{baseUrl}}/organizations/{Org-ID}/devices

.

.


So what am I missing?
Thanks

1 ACCEPTED SOLUTION
MW3
Here to help

Ok guys thank you so much for the help, ive figured it out using good ol google search..
https://community.cisco.com/t5/mobility-discussions/meraki-dashboard-api-confusion/m-p/3458242

Took 3 days to figure it out and thats mainly because none of the super extensive guides mentions that there is a difference between "meraki" devices and "system Manager" devices!!

https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API
https://developer.cisco.com/meraki/build/meraki-postman-collection-getting-started/

While the only place there is something `SM` has over 500 links on the menu.. you wouldnt expect me to go though all of them to figure it out!

https://documenter.getpostman.com/view/897512/meraki-dashboard-api/2To9xm?version=latest#intro

But anyway, thanks a lot for looking into it.. really appreciated, you guys are awesome 🙂

View solution in original post

16 REPLIES 16
MarcP
Kind of a big deal

Within Postman, its written like this and working:

 

{{baseUrl}}/organizations/{{organizationId}}/deviceStatuses

Same with the others in your list

 

2019-08-02 09_44_37-Postman.png

MW3
Here to help

Thanks for the reply. So when I say `{Org-ID}` I mean I manually put in the org id myself. So its a placeholder just to explain the issue. And also note its working for `admins` endpoint!.
MW3
Here to help

image.png

Here.. see?

MarcP
Kind of a big deal

Are you sure you are in the correct envirement and the correct Organization ID? Maybe you have got more than one (orgs / envirements)?

 

as Postman is not giving any error message and just not giving back any data this may be a problem.

MW3
Here to help

If there was a prob, it wouldnt get me `admins` and a lot of other things 🙂
MarcP
Kind of a big deal


@MW3 wrote:
If there was a prob, it wouldnt get me `admins` and a lot of other things 🙂

nope, as if you have more Organizations in your dashboard and an empty one it would still show you the admins, but no output on devices... 😉

 

API is allowed in dashboard? I am sure but just want to ask... 😉 Org - settings - Dashboard API access

 

How did you get your Org ID? Postman?

{{baseUrl}}/organizations

correct base Url? https://api.meraki.com/api/v0

MW3
Here to help

hmm

1) Ive got devices in the dashboard for the orga. Also I tried other org it always return the same.

2) I got the list of orgs by calling this:
{{baseUrl}}/organizations

3) I can assure you I dont have multiple or wrong org id in the environment.

MW3
Here to help

and also,

4) Yes the baseurl is correct
5) Ive granted access to the api. Also I deleted the access key 3 times and generated new ones just in case.

🙂
MW3
Here to help

image.png

MarcP
Kind of a big deal

mmmhh... 

I am out 😄 😞 Sorry...

 

maybe the Pros need to take a look... @BrechtSchamp @NolanHerring @AjitKumar @jdsilva @PhilipDAth for example

BrechtSchamp
Kind of a big deal

The account from which you're using the API key, what usage rights does it have? Check in Organization > Administrators

 

2019-08-02 11_07_43-Clipboard.png

Hi,

 

Yea account has full access to the network.

MW3
Here to help

{{baseUrl}}/organizations/{{organizationId}}/admins
So this works perfectly
Seshu
Meraki Employee
Meraki Employee

@MW3 What is your output if you run this command directly?

 

curl -L -H 'X-Cisco-Meraki-API-Key: <key>' -H 'Content-Type: application/json' -X GET 'https://api.meraki.com/api/v0/organizations/{organizationId}/devices'

Please replace "<key>" with your API Key (don't include '<>') and replace "{organizationId}" with your Org ID (don't include '{}')

 

Please share the output and we will see what the issue is

MW3
Here to help

image.png

MW3
Here to help

Ok guys thank you so much for the help, ive figured it out using good ol google search..
https://community.cisco.com/t5/mobility-discussions/meraki-dashboard-api-confusion/m-p/3458242

Took 3 days to figure it out and thats mainly because none of the super extensive guides mentions that there is a difference between "meraki" devices and "system Manager" devices!!

https://documentation.meraki.com/zGeneral_Administration/Other_Topics/The_Cisco_Meraki_Dashboard_API
https://developer.cisco.com/meraki/build/meraki-postman-collection-getting-started/

While the only place there is something `SM` has over 500 links on the menu.. you wouldnt expect me to go though all of them to figure it out!

https://documenter.getpostman.com/view/897512/meraki-dashboard-api/2To9xm?version=latest#intro

But anyway, thanks a lot for looking into it.. really appreciated, you guys are awesome 🙂

Get notified when there are additional replies to this discussion.