cisco-en-programmability / dnacentersdk

Cisco DNA Center Python SDK
https://dnacentersdk.readthedocs.io/en/latest/
MIT License
74 stars 33 forks source link

retrieves_all_network_devices limits to 500 #28

Closed jorgebanegas closed 3 years ago

jorgebanegas commented 3 years ago

how can I query to get all my devices instead of limiting to the first 500. I do not know how much devices I should expect. Is there a function that grabs all of the devices in one response

zapodeanu commented 3 years ago

Hi, most of the APIs will have a pagination limit of 500 records, some have a lower limit depending on the amount of data to be returned and the time required to collect the data. If the number of records is lower it will be documented in the API docs. You may receive all records using the offset and limit parameters. For example to get the records 501-600 /dna/intent/api/v1/network-device?offset=501&limit=100 You may get the count of all the network devices with the function devices.get_device_count() I will ask to have the API docs and the SDK to be updated