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 Sample property: You can specify a single endpoint to sample using the Sample property. 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 Sample property 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 Sample property:
*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 to be used by your session. For example:
{
"<table_name1>":"<endpoint1>",
"<table_name2>":"<endpoint2>",
"<table_name3>":"<endpoint3>"
}
See Input REST file syntax 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 JDBC Driver Manager or data sources as described in Connecting from an application. The following groups of properties should be addressed:
a. Required properties: Configure the required properties based on whether you are using the sample property or input REST file:
*Sample property: Set the Sample property to specify the endpoint to which you want to connect and sample. For example, https://example.com/countries/.
*Input REST file: Set the Config property to specify the name and location of the input REST file. For example, C:\path\to\myrest.rest.
b. Authentication method properties: 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. In some scenarios, the REST services may also authenticate the user ID.
*URL Parameter Authentication: The driver authenticates by passing security tokens using URLs. In some scenarios, the REST services may also authenticate the user ID.
*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. Optional properties: Set the values for any optional properties that you want to configure. See Using connection properties for a complete list of supported properties by functionality.
7. Connect to your REST service. You can use DataDirect Test to begin testing your connection immediately. See DataDirect Test for more information.
This completes the deployment of the driver.