Paging
- Last Updated: July 12, 2024
- 2 minute read
- DataDirect Connectors
- ODBC
- Autonomous Rest Connector 8.0
- Documentation
The connector supports the following paging mechanisms:
- Row offset paging
- Page number paging
- Next page token
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:
| 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:
The following request would be
issued for an entry containing
|
#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:
| 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:
| 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:
- APIs that return paging parameters as a URL, header, or query parameter in a response body.
- APIs that return paging parameters as a URL, header, or query parameter in a response header.
- APIs that use a query parameter to determine what data value to start after when returning the next page of results. See Example: Paging that uses the starting after scenario for syntax examples.
| 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 If your API utilizes starting after paging, set the
|
#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 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. |