Chris_Carr | 2022-07-26 18:17:43 UTC | #1
Hi,
Is there a way to autopaginate using python instead of changing the page_number as per the below
etUsers = json.loads(userAPI.getusers(pagesize=500, pagenumber=1.tojson()) etUsers = json.loads(userAPI.getusers(pagesize=500, pagenumber=2).tojson())
Thank you
John_Carnell | 2022-07-26 18:22:40 UTC | #2
Hi Chris,
No. The APIs are paginated and currently we generate the SDKs directly off the APIs via swagger. In the CLI, we have a layer of code sitting above our API's calls that will do the auto-pagination. We have talked about doing this in the SDKs code generation process, but we have not put it on our roadmap yet.
Thanks, John Carnell Manager, Developer Engagement
Chris_Carr | 2022-07-26 18:25:41 UTC | #3
Hi John,
Thank you, appreciate the response.
Kind Regards, Chris
Chris_Carr | 2022-07-26 19:03:28 UTC | #4
I managed to get around it with a while loop using a counter.
for example:
count = 1 while count < 9: getUsers = json.loads(userAPI.getusers(pagesize=500, pagenumber=count).tojson()) count = count + 1
Thanks again.
John_Carnell | 2022-07-27 13:26:12 UTC | #5
This post was migrated from the old Developer Forum.
ref: 15689