When managing large datasets, retrieving all rows in a single request isn’t always feasible. Pagination allows you to fetch data in manageable chunks, ensuring efficient processing
To begin implementing pagination within your integrations in LogCore Auto, start with adding a “While” step within the editor interface. Within this “While” step, nest an HTTP step. This structural setup ensures control over the iterative process required to incrementally adjust the page parameter in the request. This parameter is pivotal in signaling to the receiving API the need for pagination to efficiently manage result sets.
Next you need to configure the “While” step, adding an expression that should be evaluated to determine if the looping should continue or stop.
The “While” step will evaluate the expression on every iteration after execution of the first step within the “While”.
Next, you’ll set up the nested “Http” step pagination parameters
- Page Size (Parameter name): This is the name of the parameter that will be used to specify the number of records to be returned in a single request. This is appended to the query string of the HTTP request URL.
For the page size, you’ll often see names likesize
,pageSize
,limit
, orperPage
. - Page Size (Value): This value determines how many records are included in a single page when the API response is paginated. In the image, the value is set to ‘2’, which means each page will contain two records.
- Page Number (Parameter name): Similar to the page size, this is the name of the parameter that indicates the specific page number in the paginated results that the user wishes to access.
Common names for this parameter includepage
,pageNumber
, orpageNum
. - Page Number (Start value): This field sets the starting point for pagination. It usually begins with ‘1’, indicating the first page of results.
- Page Number (Increment with): This field dictates the incrementation step for the page number when traversing through the paginated results. Setting this to ‘1’ means that the page number will increase sequentially (e.g., 1, 2, 3, etc.) with each subsequent request.
We’ll be adding more content to this post soon to provide you with comprehensive guidance on optimizing your integration workflows.
Leave a Reply
You must be logged in to post a comment.