Establishing a Connection
The objects available within our connector are accessible from the "cdata.claudecompliance" module. To use the module's objects directly:
- Import the module as follows:
import cdata.claudecompliance as mod
- To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
mod.connect("APIKey=sk-ant-api01-your-compliance-access-key;")
Connecting to Claude Compliance
The connector 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.