skip to main content
Input REST file syntax : Table definition entries : Paging
  

Try DataDirect Drivers Now

Paging

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 REST 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.
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>",
"#maximumPageSize":1000,
"#firstRowNumber":1,
"#pageSizeParameter":"maxResults",
"#rowOffsetParameter":"startAt"
},

Row offset paging

The following table describes the parameters used to configure row offset paging:
Table 28. Row Offset Paging Properties
Property
Description
#maximumPageSize
Specifies the maximum page size in rows.
#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 29. Page Number Paging Properties
Property
Description
#maximumPageSize
Specifies the maximum page size in rows.
#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:
Table 30. Page Number Paging Properties
Property
Description
#MaximumPageSize
(Optional) Specifies the maximum page size in rows. This option is only required when the page size is not dictated by the data source.
#PageSizeParameter
(Optional) Specifies the name of the URI parameter that contains the page size.
#NextPageElement
Specifies the name of the element containing 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 slash-separated path.
#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.
* Using templates for paging parameters