Skip to content
Book a demo

Connect documentation

All documentation
Documentation

Configuring pagination in Web Connect

On this page

This guide explains how pagination works for APIs and how to configure it in Web Connect. For the rest of the Web Connect settings, see the Web Connect setup guide.

Pagination Options

Configure the fields in this section to set the pagination parameters supported or required by the API. Pagination defines how the API sends the requested data.

What is API pagination?

API pagination divides the responses into several pages to send large amounts of data more efficiently. For example, instead of 10,000 lines of JSON, the API sends 10 pages with 1,000 lines of JSON on each page. To retrieve all data from an API, all pages are fetched one after another. These pages are then combined into one data extract. Adverity’s Web Connect can fetch all pages for various API pagination options.

For a more general explanation of pagination options, see Everything You Need to Know About API Pagination.

Configuring pagination with Web Connect

Select a pagination option supported by your API from the following options:

Page & PageSize Pagination

With this pagination type, the API splits your data into pages and sends them one by one. You can define the page size.

To retrieve all of your data with this pagination type, follow these steps:

  1. In Paging Type, select Page & PageSize Pagination.

  2. In Offset Parameter Keyword, enter the name of the offset parameter specified by the API, for example, page, offset, skip.

    For GET requests, you may need to include this parameter in the request URL as well.

    For POST requests, you may need to include this parameter in the request URL or HTML request body.

  3. In Limit Parameter Keyword, enter the name of the parameter that limits how many items you retrieve on each page, for example, PageSize, limit, or take.

    For GET requests, you may need to include this parameter as well in the request URL.

    For POST requests, you may need to include this parameter in the request URL or HTML request body.

  4. In Increment, set how many items to retrieve on each page. This is used as the value for the Limit Parameter.

    We recommend that you set the increment to the highest value supported by the API.

Page Pagination

With this pagination type, the API splits your data into pages and sends them one by one. The page size is defined by the API automatically.

To retrieve all of your data with this pagination type, follow these steps:

  1. In Paging Type, select Page Pagination.

  2. In Offset Parameter Keyword, enter the name of the offsetparameter specified by the API, for example, page, offset, skip.

    For GET requests, you may need to include this parameter in the request URL as well.

    For POST requests, you may need to include this parameter in the request URL or HTML request body.

Offset & Limit Paging

With this pagination type, the API uses offset and page size parameters to split the requested data. You can define the page size.

To retrieve all of your data with this pagination type, follow these steps:

  1. In Paging Type, select Offset & Limit Paging.

  2. In Offset Parameter Keyword, enter the name of the offsetparameter specified by the API, for example, page, offset, skip.

    For GET requests, you may need to include this parameter in the request URL as well.

    For POST requests, you may need to include this parameter in the request URL or HTML request body.

  3. In Limit Parameter Keyword, enter the name of the parameter thatlimits how many items you retrieve on each page, for example, PageSize, limit, or take.

    For GET requests, you may need to include this parameter as well in the request URL.

    For POST requests, you may need to include this parameter in the request URL or HTML request body.

  4. In Increment, set how many items to retrieve on each page. Thisis used as the value for the Limit Parameter.

    We recommend that you set the increment to the highest value supported by the API.

JSON:API Cursor Paging

With this pagination type, the API returns a pointer to a specific result within the retrieved data marking how much has been sent already. The cursor is a string value.

To retrieve all of your data with this pagination type, follow these steps:

  1. In Paging Type, select JSON:API Cursor Paging.

  2. In JSON:API Cursor Parameter Keyword, enter the name of theparameter that contains the cursor pointer in the request, for example, cursor.

  3. In Pagination Parameters Positioning, select where the cursor parameter is placed in the request.

    • Select URL to place the cursor parameter in the request URL.

    • Select Request Body to place the cursor parameter in the request body.

    This field is visible for POST requests and hidden for GET requests or JSON:API Link Paging.

  4. In JSONPath, enter the JSONPath to the cursor returned in theresponse. For more information, see Using JSONPath.

JSON:API Link Paging

With this pagination, the API returns a URL to the next page of data in the response. This URL is used by Adverity to fetch the next page.

To retrieve all of your data with this pagination type, follow these steps:

  1. In Paging Type, select JSON:API Link Paging.

  2. In JSONPath, enter the JSONPath to the URL returned in theresponse. For more information, see Using JSONPath.