Skip to main content

REST API Pagination

Pagination is a way to divide the large dataset into smaller chucks. This keeps response size manageable and prevents accidental overload while fetching; Boltic allows you to paginate the API to make it easier for you to work with the large dataset.

When you configure REST API integration with Pagination, the job will run through all the API pages. It will stop calling the API response when the data node is null or empty.

Note

Configuration of REST API without pagination will fetch the first page in a single call.

Pagination Parameters

Any API response which contains a list of resources supports query parameters to handle and manage paging through the response data. To paginate the result in your API response, you must add a new parameter to the query.

Query ParametersTypeDescription
PageIntegerThis pagination return the number of results that you would like to see in the response.
Offset & LimitIntegerOffset pagination determines the starting point within the collection of resource results. Whereas Limit pagination controls the maximum of results to return.
CursorStringCursor based pagination works by sending a cursor that points to a specific item. On subsequent requests, the server uses the cursor to fetch the next items.

Page-Based Pagination

You will need to use this pagination if you wish to retrieve specific pages.

Page Based Pagination
  • Page query parameter name: Enter a name to a query parameter that Boltic uses to define the page number in the URL

  • Page initial value: To get a specific page in the response, enter its value. At a run, time job will increment until API stops giving the results.

You can use a limit parameter to control the number of records fetch by the API on the call.

Limit Parameters
  • Select the Yes button

  • Limit Parameter name: Enter the name of the query parameter that Boltic uses to limit the number of records

  • Limit initial value: The maximum number of records the API retrieves for a single call

Offset & Limit based Pagination

To use offset & limit pagination use Offset and Limit query parameters. These are used to specify how many records to return, and which batch of record to return.

Query ParametersTypeDescription
OffsetIntegerAn offset is number of records you wish to skip before selecting records.
LimitIntegerLimit controls the maximum of results to return.
Offset and Limit
  • Offset Parameter Name: Specify the name of the parameter. This can be found in the API response

  • Offset Initial Value: Enter the starting value from which API starts fetching data

  • Offset Increment by: The number of records that API must skip before it start fetching data on the next batch

  • Limit Parameter name: Enter the name of the query parameter that Boltic uses to limit the number of records

  • Limit initial value: The maximum number of records the API retrieves for a single call

Let's understand how it's work-

Let's say you have 10000 records in your API and want to retrieve the first five records out of 15. For that specification, offset initial value- 0, offset increment by 10, and limit- 5

The response from the server would be-

  • The initial value is 0

  • It retrieves the first five records

  • It then skips 10 records ( offset is now 15)

  • Again, it retrieves the first five records (15-19), this process runs until the API returns the zero

Cursor Based Pagination

A cursor is an object or pointer that points to the next page. And cursor-based pagination works by returning a pointer to a specific record in a database and grabbing all the records following the specific record.

Cursor based Pagination
  • Select the Yes button to pass the cursor parameter with a limit parameter
Yes Cursor

Now you have three options to define a cursor value-

If your next cursor is a string, then enter the name of the parameter and its JSON path

String Cursor

URL:

  • Absolute URL contains the entire information, right from the protocol to domain name (www.abc.com)

  • The relative URL contains only the path to the specific file. For example (http://abc.com/images/img.jpg)

Url Cursor
  • If your next cursor is Present in a record then enter the cursor parameter name and its JSON path
Present In Record

Any Question? 🤓

We are always an email away to help you resolve your queries. If you need any help, write to us at - 📧 support@boltic.io