07-15-2024 08:57 AM
I am trying to get network events for last 30 days, the /network/{networkid}/events has a perPage value of 3 to 1000. The documentation is unclear how to pageinate the calls. Does anyone have a working example of pulling several pages of events and placing into a spreadsheet.
Solved! Go to Solution.
07-23-2024 01:21 AM
Just happend to have a similar issue. I came up with this function. Hope this helps
07-15-2024 03:53 PM
You can include this parameter to reduce the amount of pages:
- perPage: Range is 3 - 1000. Default is 10.
The entire explanation about how Pagination works in Meraki APIs, including an example, is here: https://developer.cisco.com/meraki/api-v1/pagination/#pagination
07-15-2024 03:57 PM
I have maxed out the permanent. WhatsApp need is how to get to the next 1000 entries
07-16-2024 12:41 AM
Did you spot this bit from the link @riduque supplied?
"When you send an API request to a paginated operation, the number of records that are actually queried in the database is equal to the value of perPage. Then, the HTTP response will contain a custom header named Link. The Link header is a comma-separated list of up to 4 links: first, prev, next, and last. These links represent subsequent requests that can be used to navigate the paginated records. These links will include appropriate values for the startingAfter or endingBefore parameters in order to achieve this navigation. The exact format of the Link header might look something like:"
07-16-2024 05:11 AM
There is no links returned in the response. This is why documentation is not very well.
07-15-2024 04:10 PM
Have you tried using this parameter in your query?
perPage=1000&startingAfter=1001
07-16-2024 07:22 AM
Get GetBlueToothclients and Get NetworkEvents, no change same data coming down each time.
05-15-2025 02:29 PM
This doesnt work, does the same thing as perPage=1000
07-16-2024 12:43 AM
Going sideways - have you considered using the Meraki Python SDK for this? It does all the pagination automatically for you, so you can ignore the issue.
07-16-2024 05:11 AM
Unforturnately is has to be written in powershell.
07-23-2024 01:21 AM
Just happend to have a similar issue. I came up with this function. Hope this helps
07-23-2024 08:05 AM
thanks, what i found out from your answer is that Invoke-RestMethod only returns a JSON object, and does not allow you access to the Headers in the response. Thanks.
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