Is it possible to get 7000 devices in an Organisation information from Get Organisation Devices

Farrukh
Getting noticed

Is it possible to get 7000 devices in an Organisation information from Get Organisation Devices

Get Organization Devices
List the devices in an organization
 
This endpoint requires authentication.
 
def get_organization_devices(self,
                                 options=dict())
PARAMETERS
CONSOLE
Parameters*
organizationId*
 
 
 
perPage
The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
4 Replies 4
RaphaelL
Kind of a big deal
Kind of a big deal

Yes it is possible

hi what values can be used to get the 2nd , 3rd to 7th page 

CBurkhead
Building a reputation

The values for those tokens will always be different. You pretty much need to get them from the 'Link' field in the header data that is returned with each API call you make to the endpoint. That is what I was talking about in the thread that was linked to previously when I search for rel=next and then isolate the token value that is listed after startingAfter= in the data. That is the next token and you make another API call with that value specified for the startingAfter parameter. You keep making calls and appending/reviewing the data until you no longer find the rel=next value. Then you are on the last page of data.

 

If you want to see code, I can give you the Python code I wrote to get this data.

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.