Request all devices in a network results in an empty array

LairdTurner
Conversationalist

Request all devices in a network results in an empty array

I've tried make a request like

 

https://api.meraki.com/api/v1/networks/{networkid}/devices

 

As a response I always get an empty array, but in the dashboard there are 30 devices associated with the network
with the uses network id?
What could be wrong?

 

Thanks!

7 REPLIES 7
ww
Kind of a big deal
Kind of a big deal

you run it from where and with what code?

 

could you try run it from this site

https://developer.cisco.com/meraki/api-v1/#!get-network-devices

LairdTurner
Conversationalist

If I run it from the delevoper site I get the same response.
200 - empty array in body

ww
Kind of a big deal
Kind of a big deal

Can you verify the network id is correct?

https://developer.cisco.com/meraki/api-v1/#!get-organization-networks

 

Does this give output of the device  and network?

https://developer.cisco.com/meraki/api-v1/#!get-organization-devices

LairdTurner
Conversationalist

Hi!

 

Yes, I can verify that my used network id is correct but when I'm try to get the organization devices via

https://developer.cisco.com/meraki/api-v1/#!get-organization-devices

I get 200 and a empty array!?

ww
Kind of a big deal
Kind of a big deal

I just noticed  you posted in mdm.

The api you trying is for network devices.

 

Try this 

https://developer.cisco.com/meraki/api-v1/#!get-network-sm-devices

LairdTurner
Conversationalist

Oh! Shame on me!

This have worked! I don't have cared that I must make a request from / for the devices of the systems manager!
Thanks!

Inderdeep
Kind of a big deal
Kind of a big deal

@LairdTurner : What error message you get as you are running the correct API call !

Regards/Inder
Cisco IT Blogs awarded in 2020 & 2021
www.thenetworkdna.com
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.
Labels