Using templates for paging parameters
- Last Updated: April 10, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- Autonomous REST Connector 6.0
- Documentation
For REST services that use more complicated paging parameters, such as a
single URI parameter that contains both an offset and limit parameter, the driver supports
using templates to configure paging parameters. In these scenarios, you can specify the
pair for the values for the following parameters:
NextPageParameterPageNumberParameterPageSizeParameterRowOffsetParameter
The following syntax specifies templates for paging parameter values:
"<paging_parameter>":"<uri_option_name>=<option_element1>:{<token1>}[,<option_element2:<token2>[,...]]"
For example, the following demonstrates using variables to configure RowOffsetParameter paging:
"<table_name>": {
"#path": "<host_name>/<endpoint_path>",
"#maximumPageSize":100,
"#rowOffsetParameter":"locator=start:{OFFSET},count:{LIMIT}"
},
You can specify one or more of the following templates in the option_name=template pair:
| Token | Description |
|---|---|
{LIMIT} |
References the page size. |
{OFFSET} |
References the starting row number. |
{PAGE} |
References the page number. |
{NEXT} |
References the next-page token. |