REST Object Pagination

Pagination style differs based on the API you are using. The Modeler REST Connector supports five types of pagination:

None Pagination Style

When there is no pagination, select None. This is the default selection.

Page Pagination Style

When the API has a set number of pages, use the Page format.

Specify the Paging Parameter and set the range.

Cursor Pagination Style

Cursor-based pagination uses a cursor indicator to page through the result set. Cursor pagination uses forward (next page cursor) and reverse (previous page cursor) controls. The cursor parameter indicates the starting position of the query relation to the complete set of items. This mechanism is similar to the offset parameter, however the cursor value is encoded (or hashed) and included in JSON response while offset is numeric and can be manually entered.

The user must provide two pieces of information:

  • The name of the string that identifies the "cursor" of the API. For example, "offset" […]
  • The hashed value representing the starting point to retrieve the next page of results. In this example, that hashed value is "qe3Ws15jAb67leEh", designated by the Next field in the response.

In our example, the response would contain:

"next : qe3Ws15jAb67leEh"

Example: https://api.example.com/accounts?offset=qe3Ws15jAb67leEh

To set that up in Modeler:

Here is an example based on Twitter REST API cursor based pagination:

To set that up in Modeler:

The hashed value keeps updating for each loaded page (to point us to the next page). You must point to the field that points to the next value.

Offset Pagination Style

Offset pagination requires the user to build the pagination parameters based on the specific web based application API documentation.

The Offset Parameter pagination style is similar to the syntax for looking up multiple database records. There is both a limit and an offset query parameter. The limit is the maximum number of items to return. The offset is the starting position of the query in relation to the complete set of items.

Examples: https://api.example.com/accounts?offset=0&limit=100 https://api.example.com/accounts?offset=1500&limit=100 https://anotherapi.example.com/accounts?startAt=100&count=10

Specify these settings:

Pagination
The pagination type.
Offset Parameter
The parameter name for the offset number.
Page Size Parameter
The page size parameter name.
Page Size
The number of items returned per page.
From
The start value for the offset number. By default it is 0.

FullyBakedURL Pagination Style

For use case where the pagination is defined by a link, use the FullyBakedURL setting. Birst will automatically detect the fields containing URLs that can be used for pagination. Fully Baked URL Pagination is similar to the other styles, however instead of building a URL query for all pages, it includes a full URL representing the next result set of data (next page) in each page data (not exist or null if it represents last page of data).

Simply select the field containing the next page to explore to set pagination.