Question on Switch Port Telemetry API

Solved
DrunkBiscuit
Here to help

Question on Switch Port Telemetry API

Hello Meraki Community, 

I was testing out the port telemetry APIs, namely:

https://developer.cisco.com/meraki/api-v1/get-organization-switch-ports-statuses-by-switch/
https://developer.cisco.com/meraki/api-v1/get-organization-switch-ports-usage-history-by-device-by-i...

 

I realised that, despite my organization having around 40 switches (This information was obtained using https://developer.cisco.com/meraki/api-v1/get-organization-devices/), the APIs only showed port telemetry for 10 switches. I initially suspected that it was because some of the switches may not have had their ports active, or that the switch itself was offline, but I found that within the port telemetry response there were ports that were not enabled, and the devices were all online (https://developer.cisco.com/meraki/api-v1/get-organization-devices-availabilities/)

Surprisingly, when using the non-organisational level API:
https://developer.cisco.com/meraki/api-v1/get-device-switch-ports-statuses/

I was able to find port telemetry for switches that were NOT reflected on the org level API.

I believe my understanding is lacking somewhere, so I would appreciate some assistance with this discrepancy, thank you!

1 Accepted Solution
DrunkBiscuit
Here to help

I have found the problem:

It turns out that I did not realise pagination was applied to the API, thus reducing the number of records returned as the default was 10. Increasing the page limit using the query parameters got me the records i needed. 

For anyone facing similar issues, this page explained how to overcome pagination to get all the records you need. https://developer.cisco.com/meraki/api-v1/pagination/#pagination


View solution in original post

2 Replies 2
DrunkBiscuit
Here to help

I have found the problem:

It turns out that I did not realise pagination was applied to the API, thus reducing the number of records returned as the default was 10. Increasing the page limit using the query parameters got me the records i needed. 

For anyone facing similar issues, this page explained how to overcome pagination to get all the records you need. https://developer.cisco.com/meraki/api-v1/pagination/#pagination


MartinS
Building a reputation

Yes well figured out, pagination is important on these calls as there is #a lot# of data returned. Don't forget that if you don't want the data back on all switches there are query parameters/filters you can apply which cut the amount of data returned.

---
COO
Highlight - Service Observability Platform
www.highlight.net
Get notified when there are additional replies to this discussion.