website logo
Documentation
Guides
Navigate through spaces
Documentation
Guides
⌘K
Overview
Important Concepts
Family Systems
Fields
Products
Calls
Paginated Requests
Basic Authentication
Users
create
create_child
login
get_user_list
get_info
add_product
update
add_email
set_status
Status
create
Webhooks
JavaScript Customization
Docs powered by archbee 
6min

Paginated Requests

Several calls in the API return large lists of items. In order to moderate bandwidth, the API will break up these returns into smaller sets, and you will have to make multiple calls in order to collect all of the information. The limit per page is 50 items.

Code Samples

The code samples below will show you how to paginate through a get_user_list call.

Inspecting the basic return

First, if you're unsure of the amount of users which will be included in the return, you can begin by making the call with starting_position not included in doc. This will give you information on what you can expect from the return.

Python
|

In the top of the response, total_users will show you the total number of users in the return, while records_per_page will tell you how many will be included in each page.

JSON
|

Making the paginated call

The things to note here are that you need to increment starting_position for each call. Inside the loop, this variable is updated within payload, and the parent and child users are added to the dictionary final_return. total users is the continuationof the previous code snippet.

Python
|

And here would be the ouput (truncated).

JSON
|
Updated 07 Dec 2022
Did this page help you?
Yes
No
UP NEXT
Basic Authentication
Docs powered by archbee 
TABLE OF CONTENTS
Code Samples
Inspecting the basic return
Making the paginated call