Python API Request Get not returning all Catalyst Center devices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 10:00 AM
Python requests.get(url, headers=headers, verify=False, stream=True) is only returning the top 200 or so devices out of 1600.
Is there a way to pull all of the devices?
The end result working towards is, find all 3800 model AP's and reboot them
- Labels:
-
General
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2024 10:47 AM
Hello @JBowman9, welcome to the community!
You will need to implement pagination using the offset and limit parameters to be able to retrieve all devices. The maximum number you can fetch in a single request is 500. You can see a similar post with code samples here: https://community.cisco.com/t5/controllers/dna-center-api-500-record-limit/td-p/4125116
We will be able to help you further if you post the relevant code.
Get in touch: https://torbjorn.dev
