cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
392
Views
1
Helpful
1
Replies

Python API Request Get not returning all Catalyst Center devices

JBowman9
Level 1
Level 1

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

 

1 Reply 1

Torbjørn
VIP
VIP

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.

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev