How to get individual device status using API

ManojD
Conversationalist

How to get individual device status using API

Hi,

 

Currently we have APIs to find the devices statuses of the organization. it gives all the devices statuses, but I want to know the API which gives the status of the individual device's status.

 

Please, let me know the any API which gives the any device status by giving inputs like network's id, device's serial number.

 

Current available APIs, which gives all devices status info:

 

https://api.meraki.com/api/v0/organizations/{{organizationId}}/deviceStatuses

 

https://api-mp.meraki.com/api/v1/organizations/:organizationId/devices/statuses?perPage=%3Cinteger%3...

 

Thanks in advance,

Manoj Kumar D

 

6 Replies 6
AutomationDude
Building a reputation

Manoj, I'm not sure I understand correctly but it seems like you are already getting the device statuses. Can I ask what your goal is in trying use an API which "gives the status of the individual device's status" ? 

 

As in what are you trying to do with this information which you can't do with the data you are already getting?

I think I got an answer for that, when the org is small with not many devices it looks all right. 

 

However, we have orgs with over 15000 devices, it took 22 secs to over 100 secs for the Meraki API to return the results (including all paginations which are currently set as 1000 results per page). And from time to time, we also received nothing from the API call. 

 

For org with many devices, introducing some filters similar to "get-organization-uplinks-statuses" makes more sense.

GreenMan
Meraki Employee
Meraki Employee

I think you need to use this call.   You have to have the device serial number, for the one you are after:

 

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

 

Arul
Comes here often

hi Team.

 

 I need to get the Particular device is up / down status via API.

 

for testing, i am using the below API  and got the result without any status (Up/Down).

 

https://api.meraki.com/api/v1/devices/Q2HP-225A-XA5C

 

lat : 37.4180951010362
lng : -122.098531723022
address :
serial : Q2HP-225A-XA5C
mac : e0:55:3d:d2:4b:4c
lanIp : 192.168.128.206
url : https://n392.meraki.com/Lyoli-switch/n/kjwRabg/manage/nodes/new_list/246656714033996
networkId : L_566327653141843049
tags : {}
name : Basement switch
model : MS220-8P
switchProfileId :
firmware : switch-12-28
floorPlanId :

 

Kindly help me to get the status (UP/Down)

Mike_Mai
Comes here often

You can put the conditions {networkId[sarray], serials[array],statuses[array],models[array],

productTypes[array]} with the request: 

Curl:

curl -L --request GET --url "https://api.meraki.com/api/v1/organizations/12345/devices/statuses?serials[]=Q2CV-XXXX-XXXX" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-Cisco-Meraki-API-Key: 1234567890"

 

Python:

myDevDetail = dashboard.organizations.getOrganizationDevicesStatuses(myOrgID,serials = myDev['serial'])
 
 
Mike_Mai
Comes here often

You can put the conditions {networkId[sarray], serials[array],statuses[array],models[array],

productTypes[array]} with the request:

Curl:

curl -L --request GET --url "https://api.meraki.com/api/v1/organizations/12345/devices/statuses?serials[]=Q2CV-XXXX-XXXX" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-Cisco-Meraki-API-Key: 1234567890"

 

Python:

myDevDetail = dashboard.organizations.getOrganizationDevicesStatuses(myOrgID,serials = myDev['serial'])
 
 
Get notified when there are additional replies to this discussion.