unexpected behavior of statuses endpoint

SOLVED
bohuslavHolcek
Comes here often

unexpected behavior of statuses endpoint

Hello.
I try understud the behavior of 


/organizations/{organizationId}/devices/statuses

this endpoint.
when I use them with filters like that

 https://api.meraki.com/api/v1/organizations/457116/devices/statuses?statuses[]=offline&statuses[]=dormant

and that 

 https://api.meraki.com/api/v1/organizations/457116/devices/statuses?networkIds[]=L_674414044198733458&statuses[]=offline&statuses[]=dormant

the output is different
there is one device which is offline but in first query isnt in output. When I add there a filter for networkIds the device is in the output.
Why.?

The device is serial is Q3ED-R9Y3-N2DR
At the moment is offline.
thx for answer.

1 ACCEPTED SOLUTION
RaphaelL
Kind of a big deal
Kind of a big deal

I can confirm that this is not working as expected. 

 

My org contains 7760 devices. On those devices 256 are dormant. However , when using the filter statuses[]=dormant it only shows 20. Those 20 are only present on the first page. My guess is that when you use a filter it negates the pagination. 

 

I have opened a case about it.

View solution in original post

8 REPLIES 8
RaphaelL
Kind of a big deal
Kind of a big deal

Hi ,

 

Do you have more than 1000 devices ? If so , my guess would be that you are not using pagination : https://developer.cisco.com/meraki/api-latest/#!get-organization-devices-statuses

bohuslavHolcek
Comes here often

no. in organization is there more than 1000(i think) but i filtred them to only offline and only dormant. the response contains around 100 devices(filtered). and the given device isnt there.
if I more specificate filter and add there a networkId  the given device is there.

If you have more than 1000 devices and you are filtering on dormant , I think it will filter on the first page only 1-1000 first devices . Let's say that your dormant device is device 1001 , you won't see it in the results.



no.
i have more than 1000 devices on organization.
i requested filtered one like that

 

https://api.meraki.com/api/v1/organizations/457116/devices/statuses?statuses[]=offline&statuses[]=do...

 result is 63devices
and the device which i look for it is not there.

So i try another filter rule and I do

https://api.meraki.com/api/v1/organizations/457116/devices/statuses?networkIds[]=L_674414044198733458&statuses[]=offline&statuses[]=dormant

result is 9 devices and the device which i look for it is there.

why is not in the first result?

Probably pagination like I explained. 

 

1- Is network L_674414044198733458 present in https://api.meraki.com/api/v1/organizations/457116/devices/statuses ?

yes.

in

 

https://api.meraki.com/api/v1/organizations/457116/devices/statuses

 

 is devices from L_674414044198733458 network

RaphaelL
Kind of a big deal
Kind of a big deal

I can confirm that this is not working as expected. 

 

My org contains 7760 devices. On those devices 256 are dormant. However , when using the filter statuses[]=dormant it only shows 20. Those 20 are only present on the first page. My guess is that when you use a filter it negates the pagination. 

 

I have opened a case about it.

Thx. please inform my after will be fixed. Thx

Get notified when there are additional replies to this discussion.