JDBC Driver for Sage X3 Cloud

Build 26.0.9770

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application using the CData JDBC Driver for Sage X3 Cloud.

Follow these steps:

  1. Add the driver JAR file to the classpath. The JAR file is located in the installation directory's lib subfolder. Ensure that the .lic file is located in the same folder as the JAR file.
  2. Provide the driver class. For example:
    cdata.jdbc.sagex3cloud.SageX3CloudDriver
  3. Provide the JDBC URL. For example:
    jdbc:sagex3cloud:URL=https://x3server/;OAuthAccessTokenUrl=https://auth-domain/oauth/token;OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;Audience=https://api-audience;XAPIKey=your_api_key;Folder=SEED;

    Or, if there is a conflict in your application between drivers using the same URL format, use this form to ensure that you are using the CData driver:

    jdbc:cdata:sagex3cloud:URL=https://x3server/;OAuthAccessTokenUrl=https://auth-domain/oauth/token;OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;Audience=https://api-audience;XAPIKey=your_api_key;Folder=SEED;

    Ensure that the URL starts with either jdbc:sagex3cloud: or jdbc:cdata:sagex3cloud:. The URL can include any of the connection properties in name-value pairs separated with semicolons.

Authenticating to Sage X3 Cloud

Sage X3 Cloud uses OAuth 2.0 Client Credentials flow for authentication. An X-API-Key is also required for API access. Set AuthScheme to OAuth.

Setting Up Authentication

To authenticate, specify these connection properties:
  • OAuthAccessTokenUrl: The OAuth token endpoint (for example, https://your-auth-domain/oauth/token).
  • OAuthClientId: Your OAuth application client ID.
  • OAuthClientSecret: Your OAuth application client secret.
  • Audience: The API audience value for the token request.
  • XAPIKey: The X-API-Key provided by your Sage X3 Cloud administrator.
  • URL: The base URL of your Sage X3 Cloud instance.
  • Folder: The Sage X3 folder name (for example, SEED). This folder is used as the default schema.
  • Folders: An optional comma-separated list of Sage X3 folders (for example, SEED,PERF). Each folder is exposed as a separate schema, allowing you to query tables across multiple folders using the Schema.Table syntax. When this property is not set, only the folder specified in Folder is available.

The driver automatically obtains an access token using the Client Credentials flow and includes it with the X-API-Key in all API requests. Set InitiateOAuth to GETANDREFRESH (the default) to have the driver handle token acquisition and refresh automatically.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770