The connector supports the following paging mechanisms:

  • Row offset paging
  • Page number paging
  • Next page token
To configure paging, specify values for the following properties that correspond to the mechanism you want to employ. These properties can be specified at either the top level of the Model file, as an entry, or as a property in the body of a table definition. Properties set at the top level define the default behavior for all the tables defined in the file, while properties specified in a table definition override paging behavior for that table. If paging properties are not specified, the driver attempts to retrieve the first page for data sources that require paging.

In addition, for data sources that support more complicated parameters, you can specify parameters using a template. See "Using templates for paging parameters" for details.

Note that you can also configure paging to use HTTP response headers. See Paging that uses HTTP headers for examples of Model file syntax.

The following demonstrates the syntax used to configuring row offset paging in the body of a table definition:

"<table_name>": {
          "#path": "<host_name>/<endpoint_path>",
          "#firstRowNumber":1,
          "#maximumPageSize":1000,
          "#pageSizeParameter":"maxResults",
          "#rowOffsetParameter":"startAt"
	},

General paging parameters

The following table describes optional parameters that can be used by all paging mechanism types:

Table 1. General Paging Properties
Property Description
#fieldListParameter Specifies the name of the URI parameter that contains the comma separated list of fields to be issued in a request. For example, if you were to issue the following query with #fieldListParameter=fields:
SELECT * FROM ORDERS

The following request would be issued for an entry containing id and success fields:

https://www.example.com/ORDERS?fields=id%2Csuccess
#hasMoreElement Specifies the element in the response that denotes there is another page. The service indicates there are no additional pages by omitting the element from the response or returning a value of false. For elements not stored at the top level, this value should include a slash-separated path.
#maximumPageSize Specifies the maximum page size in rows.
#pageSizeElement Specifies the name of the element containing the page size in rows that must be passed in the URI to get the next page. For elements not stored at the top level, this value should include a slash-separated path.
#totalPagesElement Specifies the name of the element in the response that contains the total number of pages contained in the result set. For elements not stored at the top level, this value should include a slash-separated path.
#totalRowsElement Specifies the name of the element in the response that contains the total number of pages contained in the result set. For elements not stored at the top level, this value should include a slash-separated path.

Row offset paging

The following table describes the parameters that are specific to configuring row offset paging:

Table 2. Row Offset Paging Properties
Property Description
#firstRowNumber Specifies the number of the first row. The default is 0; however, some systems begin numbering rows at 1.
#pageSizeParameter Specifies the name of the URI parameter that contains the page size.
#rowOffsetParameter Specifies the name of the URI parameter that contains the starting row number for this set of rows.

Page number paging

The following table describes the parameters used to configure page number paging:

Table 3. Page Number Paging Properties
Property Description
#firstPageNumber Specifies the number of the first page. The default is 0; however, some systems begin numbering pages at 1.
#pageSizeParameter Specifies the name of the URI parameter that contains the page size.
#pageNumberParameter When requesting a page of rows, this is the name of the URI parameter to contain the page number.

Next page token paging

The following table describes the parameters used to configure next page token paging. Note that next page token paging also supports paging for the following:

Table 4. Next Page Token Paging Properties
Property Description
#nextPageElement

Specifies the name of the element name of the element in the current response that contains the token that must be passed in the URI to get the next page. For elements not stored at the top level, this value should include a path to the element.

If your API returns the URL, query parameter value, or HTTP header value used paging in the body of the response, set the #nextPageElement to specify the element in the response containing the applicable value.

If your API utilizes starting after paging, set the #nextPageElement directive to specify the field in the response that contains the data value to be sent in the query parameter to request the next page of results. This value should take the following form <object_name>/<field_name>.

#nextPageParameter

Specifies the name of the URI parameter that holds the token used to fetch the next page. This is the token found on the current page at the location specified by the #nextPageElement.

For a starting after scenario, you would specify the name of the query parameter that the driver needs to use to tell the API which data value to start after when returning the next page of results.

#pageSizeParameter Specifies the name of the URI parameter that contains the page size.
#hasMoreElement Specifies the element in the response that denotes there is another page. The service indicates there are no additional pages by omitting the element from the response or returning a value of false. For elements not stored at the top level, this value should include a slash-separated path.
#nextPageRequestHeader Specifies the name of the HTTP header to be specified in a request to retrieve the next page of results.
#nextPageResponseHeader Specifies the name of the header in the response that contains the value used for retrieving the next page of a result. This value can be either a URL, a value argument parameter in a query parameter, or a value argument of an HTTP header that is issued in request to return the next page.