skip to main content
Quick Start: Accessing REST data sources using HTTP header authentication : Using connection properties
  

Try DataDirect Drivers Now

Using connection properties

You can use connection properties to customize the driver for your environment. You can use these connection properties with either the JDBC Driver Manager or a JDBC data source. For a Driver Manager connection, a property is expressed as a key value pair and takes the form property=value. For a data source connection, a property is expressed as a JDBC method and takes the form setProperty(value). For a complete list of supported properties, refer to "Connection Property Descriptions" in the Progress DataDirect Autonomous REST Connector for JDBC User's Guide.
The following tables summarize the essential connection properties used to configure the driver using HTTP header authentication.
Note: All connection property names are case-insensitive. For example, AuthenticationMethod is the same as authenticationmethod. Required properties are noted as such.
Note: The data type listed for each connection property is the Java data type used for the property value in a JDBC data source.
Table 3. Essential Connection Properties for Sessions Using HTTP Header Authentication
Property
Characteristic
Required Properties
AuthenticationMethod
Determines which authentication method the driver uses during the course of a session.
If set to None, the driver does not attempt to authenticate.
If set to Basic, the driver uses a hashed value, based on the concatenation of the user name and password, for authentication. In addition to the User and Password properties, you must also configure the AuthHeader property if the name of your HTTP header is not Authorization (the default).
If set to HttpHeader, the driver passes security tokens via HTTP headers for authentication. You must also configure SecurityToken property and, if the name of your HTTP header is not Authorization (the default), the AuthHeader property.
If set to UrlParameter, the driver passes security tokens via the URL for authentication. You must also configure the AuthParam and SecurityToken properties.
The default is None.
Config
Specifies the name and location of the input REST file that contains the list of endpoints to sample and paging configuration information. For example, C:/path/to/mysite.rest.
For more information on information on the REST file, see "Creating a REST File for Multiple End Points."
Note: The Config property determines whether the driver uses an input REST file for the session. If no value is provided, an endpoint must be provided using the Sample property.
Sample
Specifies the endpoint to connect to and sample.
Note: This option is required when not using an input REST file.
SecurityToken
Specifies the security token required to make a connection to your REST API endpoint. This option is required when token based authentication is enabled (AuthenticationMethod=HttpHeader | UrlParameter); otherwise, this option is ignored. If a security token is required and you do not supply one, the driver returns an error indicating that an invalid user or password was supplied.
Optional Properties
AuthHeader
Specifies the name of the HTTP header used for authentication.
The default is Authorization.
CreateMap
Determines whether the driver creates the internal files required for a relational map of the native data when establishing a connection.
If set session, the driver uses memory to store the internal configuration information and relational map of native data. After the session, the view is discarded.
If set to forceNew, the driver deletes the current internal configuration files and relational map specified by the SchemaMap property and creates a new set at the same location.
If set to notExist, the driver uses the current internal files and relational map specified by the SchemaMap property. If the files do not exist, the driver creates them.
Default: session
SchemaMap
Specifies the directory where internal files and the relational map of native data data are written. The driver looks for this location when connecting to an endpoint. If these files do not exist, the driver creates them.
Windows default:
application_data_folder\Local\Progress\DataDirect\AutoREST_Schema\
UNIX/Linux default:
~/progress/datadirect/AutoREST_Schema/
ServerName
Specifies the host name portion of the HTTP endpoint to which you send requests. Specify this value if you want to define endpoints without storing the host name component in the REST file.
User
If required, specifies the user name used to access your endpoint.