skip to main content
Using the Driver : Setting Up the Driver
  

Try DataDirect Drivers Now

Setting Up the Driver

After installation, you will need to complete several tasks before you can begin accessing data with the Autonomous REST Connector. This section provides you with an overview of those tasks and the recommended set-up of the driver. Refer to the references within the steps for detailed information related to each task.
To begin accessing data with the driver:
1. Determine the method the driver will use to sample endpoints for relational mapping:
*Using the REST Sample Path connection option: You can specify a single endpoint to sample using the REST Sample Path (RestSamplePath) option. At connection, the driver samples the specified endpoint and infers a schema based on the results. This method allows you to begin accessing data with a minimal amount of configuration, but lacks some of the functionality supported by the input REST file method.
See Using the REST Sample Path Method for more information. Skip to Step 6.
*Using the input REST file: You can specify multiple endpoints to sample using the input REST file. This method also allows you to leverage the file's supported syntax to define POST requests, and configure paging and other customizations supported by the input REST file.
See Using the Input REST File Method for more information. Proceed to the next step.
You must use an input REST file if your session if session does any you of the following; otherwise, we recommend using the REST Sample Path option:
*Accesses multiple endpoints
*Issues POST requests
*Accesses endpoints that require paging
*Uses a custom authentication method
*Uses other customizations supported by the input REST file
2. Using a text editor, create an input REST file. The input REST file is a simple text file that uses the file_name.rest naming convention.
Note: The product ships an example REST file, example.rest, that is installed in the install_dir/restfiles/ directory. Instead of creating a new REST file, this file can be edited to be used with your connection.
3. In the REST file, type a comma-separated list of the GET endpoints and associated table names to be used by your session. For example:
{
"<table_name1>":"<endpoint1>",
"<table_name2>":"<endpoint2>",
"<table_name3>":"<endpoint3>"
}
See Creating an Input REST File for a detailed description of the syntax supported by the file.
4. If your session uses POST requests, type your POST endpoints in the comma-separated list of endpoints in your input REST file. See POST requests for details.
5. If any of your endpoints require paging, configure either offset or page numbering paging for affected endpoints in your input REST file. See Paging for details.
6. Configure the driver to connect using the data sources or DSN-less methods as described in Configuring and Connecting to Data Sources. The following groups of options should be addressed:
a. Required options: Configure the required options based on whether you are using the Rest Sample Path option or input REST file:
*REST Sample Path option: Set the REST Sample Path (RestSamplePath) option to specify the endpoint to which you want to connect and sample. For example, https://example.com/countries/.
See REST Sample Path for details.
*Input REST file: Set the REST Config File (RestConfigFile ) option to specify the name and location of the input REST file. For example, C:/path/to/myrest.rest.
See REST Config File for details.
b. Authentication method options: Configure the driver according to the authentication method used by your REST service. The driver supports the following methods:
*No authentication: The driver does not attempt to authenticate.
*Basic authentication: The driver authenticates using the specified user IDs, passwords, and HTTP headers.
*HTTP header authentication: The driver passes security tokens via the HTTP headers to authenticate.
*URL parameter authentication: The driver authenticates by passing security tokens using URLs.
*OAuth 2.0 authentication: The driver authenticates using OAuth 2.0 authentication flows.
*Custom authentication requests: The driver uses a custom token-based authentication flow that is defined in the input REST file.
See Authentication for configuration details.
c. Data encryption options: If you are accessing an HTTPS endpoint, set the values for the data encryption options that apply to your data source. See Summary of Data Encryption Options for a description of these options.
d. Optional connection options: Set the values for any optional connection options that you want to configure. See Connection Option Descriptions for a complete list of supported options.
7. On Linux platforms, set the library search path variable by executing the appropriate shell script located in the product installation directory:
*C shell: odbc.csh
*Bourne shell: odbc.sh
See Environment Variables for details. Note that for Windows platforms, the Library Path Environment variable during installation.
8. Connect to your REST service. You can use the installed Example Application to begin testing your connection immediately. See The Example Application for details.
This completes the deployment of the driver.