Skip to main contentSkip to search
Powered by Zoomin Software. For more details please contactZoomin
Progress DocumentationProgress Documentation
Progress Documentation
  • Home
  • Home
  • EnglishČeštinaDeutsch (Germany)Español (Spain)Français (France)Italiano (Italy)Português (Brasil)日本語Русский (Russia)中文 (简体) (China)中文 (繁體, 台灣) (Taiwan)ar-AR
  • Login

Progress DataDirect Autonomous REST Connector for JDBC User's Guide Release 6.0.1

Example: Paging that uses HTTP link headers

Save PDF
Save selected topicSave selected topic and subtopicsSave all topics
Share
Share to emailCopy topic URL
Print
Table of Contents
  • Welcome to the Progress DataDirect Autonomous REST Connector for JDBC
    • What's new in this release?
    • Requirements
    • Getting started using prebuilt Model files
    • Getting started creating a Model file
    • Installing and setting up the driver
    • Driver and DataSource classes
    • Connection URL examples
    • Mapping objects to tables
      • Mapping JSON responses
        • Normalizing JSON maps
      • Mapping XML responses
      • Mapping CSV responses
      • Determining the primary key
    • Data types
      • getTypeInfo()
    • SQL escape sequences
      • Supported scalar functions
    • Driver specifications
    • DataDirect tools
    • Troubleshooting
    • Additional information
    • Contacting Technical Support
  • Tutorials
    • Interactive SQL
    • Tableau
    • DbVisualizer
      • Adding a driver
      • Connecting and executing SQL statements
  • Configuring and connecting
    • Setting the classpath
    • Configuring the relational map
    • Generating a Model file with the Autonomous REST Composer
      • Sampling REST endpoints
      • Parameter variables
      • Customizing your schema
      • Configuring custom authentication with the Configuration Manager
      • Testing and querying your Model
      • Reviewing the status of your endpoints
    • Connecting using the JDBC Driver Manager
      • Passing the connection URL
      • Generating connection URLs with the Configuration Manager
      • Testing connections and queries
    • Connecting using data sources
      • How data sources are implemented
      • Creating data sources
        • Example data source
      • Calling a data source in an application
      • Testing a data source connection
    • Authentication
      • Basic authentication
      • AWS credentials authentication
      • Bearer token authentication
      • Digest authentication
      • HTTP header authentication
      • URL parameter authentication
      • OAuth 2.0 authentication
        • Access token flow
        • Authorization code grant
        • Client credentials grant
        • Dynamic authorization code grant
        • JWT bearer grant
        • Password grant
        • PKCE grant
        • Refresh token grant
        • Obtaining access and refresh tokens using the Configuration Manager
      • Custom authentication
    • Data Encryption
      • Configuring TLS/SSL Encryption
      • Configuring TLS/SSL Server Authentication
      • Configuring TLS/SSL Client Authentication
      • FIPS (Federal Information Processing Standard)
    • Connecting through a proxy server
    • Performance considerations
  • Additional features and functionality
    • Identifiers
    • Scrollable cursors
    • Parameter metadata support
    • ResultSet metaData support
    • Rowset support
  • Connection property descriptions
    • AccessKey
    • AccessToken
    • AuthenticationMethod
    • AuthHeader
    • AuthParam
    • AuthURI
    • ClaimsIssuer
    • ClaimsSubject
    • ClientCredentialsMode
    • ClientID
    • ClientSecret
    • Config
    • ConvertNull
    • CryptoProtocolVersion
    • CustomAuthParams
    • DebugRecord
    • DefaultQueryOptions
    • EnableLoginPrompt
    • EncryptionMethod
    • FetchSize
    • FileTransferPartSize
    • HealthURI
    • HostNameInCertificate
    • ImportStatementPool
    • InsensitiveResultSetBufferSize
    • JDBCBehavior
    • JSONRoot
    • JWTCertAlias
    • JWTCertPassword
    • JWTCertStore
    • KeyPassword
    • Keystore
    • KeystorePassword
    • LogConfigFile
    • LogoffURI
    • MaxPooledStatements
    • OAuthCode
    • Password
    • PortNumber
    • ProxyHost
    • ProxyPassword
    • ProxyPort
    • ProxyUser
    • QualifyNormalizedNames
    • ReadAhead
    • RedirectURI
    • RefreshDirtyCache
    • RefreshToken
    • Region
    • RegisterStatementPoolMonitorMBean
    • Sample
    • SamplingFailureTolerance
    • Scope
    • SecretKey
    • SecurityToken
    • ServerName
    • SpyAttributes
    • StmtCallLimit
    • StmtCallLimitBehavior
    • Table
    • TokenURI
    • TransactionMode
    • Truststore
    • TruststorePassword
    • User
    • ValidateServerCertificate
    • WSFetchSize
    • WSPoolSize
    • WSRetryCount
    • WSTimeout
  • Model file syntax
    • HTTP response code processing
    • OAuth 2.0 authentication
    • Custom authentication requests
    • Table definition entries
      • Schema name
      • Write operations
      • Paging
        • Example: Paging that uses HTTP link headers
        • Example: Next page token paging that uses a URL returned in a response body
        • Example: Next page token paging that uses an HTTP header returned in a response body
        • Example: Next page token paging that uses a query parameter returned in a response body
        • Example: Next page token paging that uses a URL returned in a response header
        • Example: Next page token paging that uses an HTTP header returned in a response header
        • Example: Next page token paging that uses a query parameter returned in a response header
        • Example: Paging that uses the starting after scenario
        • Using templates for paging parameters
      • REST model parsing
      • POST requests
        • POST requests with an empty body
      • Requests with custom HTTP headers
      • Requests with custom parameters
      • Query paths
        • Requests with unparameterized paths
        • Requests with parameterized paths
        • Requests with query parameters
        • Arrays of endpoints
      • Column names
      • Data type mapping
      • Primary key
      • Read-only columns
      • Nullable columns
      • Columns as an array
      • Columns as a key-value map
      • Columns with nested objects
      • Date, time, and timestamp formats
      • Subfields
      • Columns as HTTP headers
      • Filtering and URI parameters
    • User-defined functions and procedures
      • Parameters
      • Data types syntax
      • DETERMINISTIC statements
      • NULL-input statements
      • SPECIFIC statements
      • Routine language
      • EXTERNAL statements
      • Result sets
      • RETURN statements
      • Compound statements
      • Procedural SQL statements
        • CALL statements
        • CASE statements
        • Column definitions
        • Cursor declarations
        • DELETE statements
        • FOR statements
        • Handler declarations
        • IF statements
        • INSERT statements
        • ITERATE statement
        • LEAVE statements
        • MERGE Statements
        • LOOP statements
        • OPEN statements
        • REPEAT statements
        • RESIGNAL statements
        • SET statements
        • SIGNAL statements
        • Scalar declarations
        • Singleton SELECT statements
        • Table declarations
        • UPDATE statements
        • WHILE statements
    • URL-encoded values
    • Example Model file
  • Supported SQL statements and extensions
    • Alter Session (EXT)
    • Delete
    • Insert
    • Refresh Map (EXT)
    • Select
      • Select clause
        • Aggregate functions
        • From clause
          • Join in a From clause
          • Subquery in a From clause
        • Where clause
        • Group By clause
        • Having clause
        • Union operator
        • Intersect operator
        • Except and Minus operators
        • Order By clause
        • Limit clause
    • Update
    • SQL expressions
      • Column names
      • Literals
        • Character string literals
        • Numeric literals
        • Binary literals
        • Date/Time literals
        • Integer literals
      • Operators
        • Unary operator
        • Binary operator
        • Arithmetic operators
        • Concatenation operator
        • Comparison operators
        • Logical operators
        • Operator precedence
      • Functions
      • Conditions
    • Subqueries
      • IN predicate
      • EXISTS predicate
      • UNIQUE predicate
      • Correlated subqueries
  • Pre-defined stored procedures
    • Amazon S3 stored procedures
      • copyObject
      • downloadObject
      • uploadObject
      • getObjectSize
      • uploadFile
      • downloadFile
    • Box stored procedures
      • copyFile
      • copyFolder
      • downloadObject
      • uploadObject
    • Dropbox stored procedures
      • deleteFile
      • downloadFile
      • uploadFile
    • Google Drive stored procedures
      • downloadObject
      • uploadObject
    • Microsoft Azure Data Lake stored procedures
      • appendFile
      • copyFile
      • createFile
      • createFolder
      • downloadFile
      • flushFile
      • uploadFile
      • writeFileContents
  • Copyright
Table of Contents

Example: Paging that uses HTTP link headers

Save PDF
Save selected topicSave selected topic and subtopicsSave all topics
Share
Share to emailCopy topic URL
Print
  • Last Updated: January 23, 2024
  • 2 minute read
    • DataDirect Connectors
    • JDBC
    • Autonomous REST Connector 6.0
    • Documentation

The following examples demonstrate the Model file syntax for services that configure paging by passing parameters in headers.

GitHub

When paging is configured in a request to GitHub, the service includes link headers in the response header. Link headers are comprised of a list of URLs with query parameters that can be used to fetch pages in a result. Through the query parameters, link headers configure pagination behavior such as page size and ordinal information. For example:
link: <https://api.github.com/repositories/1234567/issues?page=2>; rel="prev", 
      <https://api.github.com/repositories/1234567/issues?page=4>; rel="next", 
      <https://api.github.com/repositories/1234567/issues?page=200>; rel="last", 
      <https://api.github.com/repositories/1234567/issues?page=1>; rel="first"

To enable paging and set parameters in a request to GitHub, you must to specify certain properties in the Model file. First, set the #maximumPageSize property to specify the maximum rows returned in a page. Then, configure the #nextPageParameter to specify which URI parameter that holds the token to fetch the next page.

The following example demonstrates configuring next page token paging for the AllUsers table from a GitHub service.
"AllUsers":{
	"#maximumPageSize":"30",
	"#nextPageParameter":"since",
	"#path":[
		"IDENTITY users/{login}",
		"users"
	],
	"#headers": {
		"Accept": "application/vnd.github.v3+json"
	},
	"id":"Integer,#key",
//Additional table definition syntax can be populated after paging parameters.
}

OKTA

For OKTA services, responses to requests that configure paging include a series of link headers that are used to fetch pages in the result. Each link header returned represents a page in the result and includes paging configuration information, such as the page size, ordinal information, and the cursor ID number. For example:
link: <https://{myDomain}/api/v1/logs?limit=25>; rel="self"
link: <https://{myDomain}/api/v1/logs?limit=25&after=1234567898765_1>; rel="next"

To configure paging for OKTA services in a request, you must specify the page size using the #maximumPageSize property and, via the #nextPageParameter, the query parameter specifying the token ID number.

The following example demonstrates configuring Next Page Token Paging with the USERS table from an OKTA service.
"USERS": {
    "#path": [
      "/users"
    ],
	"#maximumPageSize": 20,
	"#nextPageParameter": "after",
	"id": "VarChar(30),#key",
//Additional table definition syntax can be populated after paging parameters.
}
TitleResults for “How to create a CRG?”Also Available inAlert