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 Claude Compliance.Follow these steps:
- 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.
- Provide the driver class. For example:
cdata.jdbc.claudecompliance.ClaudeComplianceDriver
- Provide the JDBC URL. For example:
jdbc:claudecompliance:APIKey=sk-ant-api01-your-compliance-access-key;
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:claudecompliance:APIKey=sk-ant-api01-your-compliance-access-key;
Ensure that the URL starts with either jdbc:claudecompliance: or jdbc:cdata:claudecompliance:. The URL can include any of the connection properties in name-value pairs separated with semicolons.
Connecting to Claude Compliance
The driver connects to Claude Compliance using a Compliance Access Key. This is the only supported authentication method.
Authenticate with a Compliance Access Key
To create a Compliance Access Key:
- Enable the Compliance API for your organization.
- Sign in to claude.ai as a primary owner or organization owner and open Organization settings > API > Keys.
- Select Create Key and assign only the scopes your integration needs:
- read:compliance_activities for Activities and the typed activity views.
- read:compliance_org_data for organizations, roles, groups, and settings.
- read:compliance_user_data for users, chats, files, projects, and downloads.
- delete:compliance_user_data for the explicit Delete* stored procedures.
- Create the key.
- Copy the key when it appears. The key starts with sk-ant-api01- and is shown only once.
Then set the following connection property:
- APIKey: The Compliance Access Key you created.
Optional connection properties
The OrganizationUUID parameter determines which organization is used in organization-scoped views (such as OrganizationUsers, ComplianceRoles, and ComplianceRolesPermissions). When set, these views are limited to a single linked organization.
If OrganizationUUID is left empty, the view defaults to the first available organization but does not include data from all linked Organizations.