JDBC Driver for API

Build 23.0.8839

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for API consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.api.APIDriver
  • Provide the JDBC URL. For example:
    jdbc:api:Profile=<Path to Profile>;ProfileSettings=<Profile Configuration Settings>
    
    or
    
    jdbc:cdata:api:Profile=<Path to Profile>;ProfileSettings=<Profile Configuration Settings>

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:api:" or "jdbc:cdata:api:" and can include any of the connection properties in name-value pairs separated with semicolons.

The CData JDBC Driver for API can be used to connect to a variety of data sources from within your application.

Connecting to Profiles

The driver can be used to connect to a variety of data sources, called Profiles, from within your application. An API profile is a collection of schemas modeling data from an application or online service as tables, views or stored procedures. API Profile files have the file exension ".apip" and can be download from the CData website.

To establish a connection using a Profile, set the Profile property to the path of the API profile file, and ProfileSettings to a connection string containing the credentials to the data-source. The most common forms of authentication are supported, including HTTP basic, HTTP digest, NTLM, and OAuth. For more information on the required connection properties, please refer to the documentation of each profile.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839