paging of results
ahusking opened this issue · 4 comments
ahusking commented
Attempting to get a list of all network devices (to then enumerate the location for each of them).
But i can't find any information on expanding or even paging the results.
TIA
falkowich commented
Ah, sorry.
I have been cougt up in some work related stuff lately, but I'll check this out "PASAP" :)
--
Regards Falk
falkowich commented
Hi,
For the moment, I usually use something like this:
for endpoint in res["response"]:
endpoints.append(endpoint)
# Check if there is a nextPage
pagesleft = res.get("nextPage")
while pagesleft:
print(f"Endpoints: {num}")
nextpage = res["nextPage"]
res = ise.get_endpoints(groupID=group_id, size=100, page=nextpage)
pagesleft = res.get("nextPage")
num = num + 100
for endpoint in res["response"]:
endpoints.append(endpoint)
print(f"Endpoints: {len(endpoints)}")
return endpoints
…--
Kind regards Falk
Den mån 25 juli 2022 kl 10:36 skrev Chris Wolfe ***@***.***>:
any updates on how to handle the paginated output ? looks like the next
page URL isn't fully being returned.
—
Reply to this email directly, view it on GitHub
<#147 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL3CQN5DAGI7FMTL2O3D5TVVZGW3ANCNFSM4WMFRI3Q>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
falkowich commented
This is a documentation issue.. /me thinks