Skip to main content
Audit Logs only available in a paid plan. Please activate a license key to use this feature.
Audit logs are a collection of notable events performed by users within a Sourcebot deployment. Each audit log records information on the action taken, the user who performed the action, and when the action took place. This feature gives security and compliance teams the necessary information to ensure proper governance and administration of your Sourcebot deployment.

Retention Policy

By default, audit logs older than 180 days are automatically pruned daily. You can configure the retention period using the SOURCEBOT_EE_AUDIT_RETENTION_DAYS environment variable. Set it to 0 to disable automatic pruning and retain logs indefinitely.

Fetching Audit Logs

Audit logs are stored in the postgres database connected to Sourcebot. To fetch all of the audit logs, you can use the following API:
Fetch audit logs
Fetch audit logs example response
Each record includes an actorLabel and a targetLabel. These are display names captured when the event is recorded, so a record stays readable after its actor or target is deleted. Labels are null for types without a display name (e.g., org and system) and for records created before labels were added.

Audit action types

Usage events (code searches, code navigation, file views, repository listings, and Ask chats) are not recorded in the audit log. Records of these events created by earlier versions stay in the audit API until the retention policy prunes them.

Response schema

Audit log fetch response schema