Connection URL examples
- Last Updated: February 12, 2025
- 3 minute read
- DataDirect Connectors
- JDBC
- Autonomous REST Connector 6.0
- Documentation
After setting the CLASSPATH, the connection information needs to be passed in the form of a connection URL. This section provides examples of connection strings configured to use common features and functionality. You can modify and/or combine these examples to create a connection string for your environment.
- You can also use the DataDirect Configuration Manager tool to generate and test connection URLs. For more information, see "Generating connection URLs with the Configuration Manager."
- Connection property names are case-insensitive. For example,
Passwordis the same aspassword. - For connection properties that support string values, use the following
escape sequence to specify values containing leading or trailing spaces and
curly brackets:
{value}. For example:User={hello }orPassword={{hello}}.
Connection URLs for the Autonomous REST Connector can take a few different forms. Typically, the composition of the URL depends on whether you want to use a Model file, which requires configuring the Rest Config File (RESTConfigFile) option, or specify a single endpoint, which requires the Rest Sample Path (RestSamplePath) option. However, note that these options are not required in all scenarios, such as when the driver is executing dynamically created stored procedures or functions.
For sessions using a Model file (sessions that use multiple endpoints, POST requests, or other customizations supported by the Model file):
jdbc:datadirect:autorest://servername;Config=model_file_path;[property=value[;...]];
For sessions using the Sample property:
jdbc:datadirect:autorest:Sample=sample_path;[property=value[;...]];
Note that all the examples in this section use the Model file.
- Basic authentication
- AWS credentials authentication
- Bearer token authentication
- Digest authentication
- HTTP header authentication
- URL parameter authentication
- Access token flow authentication
- Authorization code grant authentication
- Client credentials grant authentication
- JWT bearer grant authentication
- Password grant authentication
- PKCE grant authentication
- Refresh token grant authentication
- Proxy server authentication
Basic authentication
This string includes the properties used to connect to a server using a Model file and basic authentication.
jdbc:datadirect:autorest:https://example.com/;AuthenticationMethod=basic;
Config=C:/path/to/myrest.rest;User=jsmith;Password=secret;
For more information on these properties and values, see Basic authentication.
AWS credentials authentication
This string includes the properties used to connect to a server using a Model file and AWS (Amazon Web Services) credential authentication.
jdbc:datadirect:autorest:https://example.com/;AuthenticationMethod=AWS;
Config=C:/path/to/myrest.rest;AccessKey=ABCDEFGHIJKL1EXAMPLE;Region=us-east-2;
SecretKey=aBcdeFGhiJKLM/N1OPQRS/tUvWxyzYEXAMPLEKEY";
For more information on these properties and values, see AWS credentials authentication.
Bearer token authentication
This string includes the properties used to connect to a server using a Model file and bearer token authentication.
jdbc:datadirect:autorest:https://example.com/;AuthenticationMethod=BearerToken;
Config=C:/path/to/myrest.rest;SecurityToken=C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx;
For more information on these properties and values, see Bearer token authentication.
Digest authentication
This string includes the properties used to connect to a server using a Model file and digest authentication.
jdbc:datadirect:autorest:https://example.com/;AuthenticationMethod=basic;
Config=C:/path/to/myrest.rest;User=jsmith;Password=secret;
For more information on these properties and values, see Digest authentication.
HTTP header authentication
This string includes the properties used to connect to a server using a Model file and HTTP header authentication.jdbc:datadirect:autorest:https://example.com/;AuthenticationMethod=HttpHeader;
Config=C:/path/to/myrest.rest;SecurityToken=XaBARTsLZReM;User=jsmith;For more information on these properties and values, see HTTP header authentication.
URL parameter authentication
This string includes the properties used to connect to a server using an Model file and URL parameter authentication.
jdbc:datadirect:autorest:https://example.com/;AuthenticationMethod=UrlParameter;
Config=C:/path/to/myrest.rest;SecurityToken=XaBARTsLZReM;User=jsmith;
For more information on these properties and values, see URL parameter authentication.
Access token flow authentication
This string includes the properties used to connect to a server using a Model file and OAuth 2.0 access token flow.
jdbc:datadirect:autorest:https://example.com/;
AccessToken='C3TQH9zjwek4CgJCU-4Mxb2DxLNfI2LB3a-dNfpWYx';
AuthenticationMethod=OAuth2-AccessToken;Config=C:/path/to/myrest.rest;
For more information on these properties and values, see Access token flow.
Authorization code grant authentication
This string includes the properties used to connect to a server using a Model file and OAuth 2.0 authorization code grant.
jdbc:datadirect:autorest:AuthenticationMethod=OAuth2-AuthorizationCode;
ClientID='abcdefghik2lmn3o5qr67s';Config=C:/path/to/box.rest;
OAuthCode='xyz123abc';TokenURI='https://api.box.com/oauth2/token';
For more information on these properties and values, see Authorization code grant.
Client credentials grant authentication
This string includes the properties used to connect to a server using a Model file and OAuth 2.0 client credentials grant.
jdbc:datadirect:autorest:AuthenticationMethod=OAuth2-ClientCredentials;
ClientID='123456789876-a1bc2de3fgh4ij567klmn8opqr9stuvw.apps.googleusercontent.com';
ClientSecret='FaZBFRsGXTaR';Config=C:/path/to/googleanalytics.rest;
TokenURI=https://accounts.google.com/o/oauth2/token;
For more information on these properties and values, see Client credentials grant.
JWT bearer grant
This string includes the properties used to connect to a server using a Model file and OAuth 2.0 JWT bearer grant.
jdbc:datadirect:autorest:AuthenticationMethod=OAuth2-JWTBearer;
ClaimsIssuer='1a2b3c4d5e_6f7g8h9g';ClaimsSubject=jsmith@example.com;
Config=C:/path/to/salesforce.rest;JWTCertStore=jwtcert.jks;
JWTCertPassword=secret;JWTCertAlias=myAlias;
For more information on these properties and values, see JWT bearer grant.
Password grant authentication
This string includes the properties used to connect to a server using a Model file and OAuth 2.0 password grant.
jdbc:datadirect:autorest:AuthenticationMethod=OAuth2-Password;
ClientID='123456789876-a1bc2de3fgh4ij567klmn8opqr9stuvw.apps.googleusercontent.com';
ClientSecret='FaZBFRsGXTaR';Config=C:/path/to/googleanalytics.rest;
TokenURI=https://accounts.google.com/o/oauth2/token;
For more information on these properties and values, see Password grant.
PKCE grant authentication
This string includes the properties used to connect to a server using a Model file and OAuth 2.0 PKCE grant.
jdbc:datadirect:autorest:AuthenticationMethod=OAuth2-PKCE;
AuthURI=https://accounts.spotify.com/authorize;ClientID='abcdefghik2lmn3o5qr67s';
ClientSecret=FaZBFRsGXTaR;Config=C:/path/to/spotify.rest;
RedirectURI=https://localhost:8080;TokenURI='https://accounts.spotify.com/api/token';
For more information on these properties and values, see PKCE grant.
Refresh token grant authentication
This string includes the properties used to connect to a server using a Model file and OAuth 2.0 refresh token grant.
jdbc:datadirect:autorest:AuthenticationMethod=OAuth2-RefreshToken;
ClientID='123456789876-a1bc2de3fgh4ij567klmn8opqr9stuvw.apps.googleusercontent.com';
ClientSecret='FaZBFRsGXTaR';Config=C:/path/to/googleanalytics.rest;
TokenURI=https://accounts.google.com/o/oauth2/token;
For more information on these properties and values, see Refresh token grant.
Proxy server authentication
This string includes the properties used to connect using a Model file through a proxy server with basic authentication.
jdbc:datadirect:autorest:https://example.com/;AuthenticationMethod=basic;
Config=C:/path/to/myrest.rest;ProxyHost=proxy_host;
ProxyPassword=proxy_password;ProxyPort=proxy_port;
ProxyUser=proxy_user;User=jsmith;Password=secret;
[property=value[;...]];