02-04-2025 10:26 PM
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-interval/
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!
Solved! Go to Solution.
02-05-2025 12:05 AM
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
02-05-2025 12:05 AM
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
02-05-2025 05:20 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide