cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Query on "API calls to Meraki demo environment"

SOLVED
New here

Query on "API calls to Meraki demo environment"

Hello,

 

Starting to explore how Meraki API works, so launched a meraki demo environment to test it.

 

Below are my network dashboard on demo environment

demo-dash.JPG

 

1. The data we need to fetch via API for each networks are  Devices, Firmware status & Offline devices etc

 

But when I used below API call, above needed infos are missing.

https://api.meraki.com/api/v0/organizations/<org-id>/networks/ 

 

Response:

{
"id": "net-id",
"organizationId": "org-id",
"name": "Live Demo - University Wireless",
"timeZone": "America/Los_Angeles",
"tags": null,
"productTypes": [
"wireless"
],
"type": "wireless",
"disableMyMerakiCom": false,
"disableRemoteStatusPage": true
},

 

 

2. Also when tried to get firmware status of each device via API, it gives different response than to whats displayed in dashboard.

 

Below is the firmware detail of a device in "Live Demo -  Switches" network in dashboard.

firmware.JPG

 

Used below API to fetch the firmware details of the same device, firmware details fetched via API not matches with what showed in dashboard as above.

https://api.meraki.com/api/v0/organizations/<org-id>/networks/<net-id>/devices/<device-serial-num>

 

{
"lat": ,
"lng": ,
"address": null,
"serial": "",
"mac": "",
"lanIp": null,
"networkId": "",
"name": "Office POE switch #3",
"model": "MS22P",
"switchProfileId": null,
"firmware": "Not running configured version",
"floorPlanId": null
}
 
Is the API call used are correct? or the data fetched via demo environment are limited.
 
Thanks,
Mohan
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Kind of a big deal

Re: Query on "API calls to Meraki demo environment"

Hey @Mohanraj 

 

Some of what you want might require a couple steps. 

 

>> 1. The data we need to fetch via API for each networks are  Devices, Firmware status & Offline devices etc

 

You listed the Networks endpoint, which only gets info about networks, not devices. To get the devices in a network you want this:

 

https://api.meraki.com/api_docs#list-the-devices-in-a-network

 

But to get the status you will need this:

 

https://api.meraki.com/api_docs#list-the-status-of-every-meraki-device-in-the-organization

 

You can use the networkId field to collate these and get what you're after.

 

 >>2. Also when tried to get firmware status of each device via API, it gives different response than to whats displayed in dashboard.

 

What you're seeing here means that the device(s) are "pinned" by support to a different firmware level than what the network is set to. This doesn't usually happen unless support has a reason to do so, and in the case of this Demo network who knows what they're doing behind the scenes. In normal network this should actually match what the network is set to. 

 

View solution in original post

2 REPLIES 2
Highlighted
Kind of a big deal

Re: Query on "API calls to Meraki demo environment"

Hey @Mohanraj 

 

Some of what you want might require a couple steps. 

 

>> 1. The data we need to fetch via API for each networks are  Devices, Firmware status & Offline devices etc

 

You listed the Networks endpoint, which only gets info about networks, not devices. To get the devices in a network you want this:

 

https://api.meraki.com/api_docs#list-the-devices-in-a-network

 

But to get the status you will need this:

 

https://api.meraki.com/api_docs#list-the-status-of-every-meraki-device-in-the-organization

 

You can use the networkId field to collate these and get what you're after.

 

 >>2. Also when tried to get firmware status of each device via API, it gives different response than to whats displayed in dashboard.

 

What you're seeing here means that the device(s) are "pinned" by support to a different firmware level than what the network is set to. This doesn't usually happen unless support has a reason to do so, and in the case of this Demo network who knows what they're doing behind the scenes. In normal network this should actually match what the network is set to. 

 

View solution in original post

New here

Re: Query on "API calls to Meraki demo environment"

Thanks jdsilva for the response. will check with real device.
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.