Available on the Enterprise plan. Contact sales to learn more.
Access requirements
Organization admins and members with the Audit Log Reader role can access audit logs. Regular members cannot access audit logs, even for resources they own.Entry structure
Each entry contains:- Actor: Who (user, service account, runner, or system)
- Subject: What resource and type
- Action: Operation performed (e.g., “Environment created”)
- Timestamp: When
- Organization: Which org
What gets logged
All create, update, and delete operations on:| Category | Resources |
|---|---|
| Infrastructure | Environments, Runners, Projects, Environment Classes |
| Execution | Tasks, Services, Workflows, Agents, and their executions |
| Security | Users, Service Accounts, Tokens, Secrets, SSO Config, Groups, Login/Logout events |
| Organization | Policies, Domain Verification, Custom Domains, Billing |
| Integrations | SCM/LLM Integrations, Prebuilds, Snapshots, Prompts |
| Type | Description |
|---|---|
PRINCIPAL_USER | Human users |
PRINCIPAL_SERVICE_ACCOUNT | Service accounts |
PRINCIPAL_RUNNER | Runner infrastructure |
PRINCIPAL_ENVIRONMENT | Environment processes |
PRINCIPAL_RUNNER_MANAGER | Runner management systems |
PRINCIPAL_ACCOUNT | Account-level operations |
Querying audit logs
CLI
Theona CLI (pre-installed in all environments) is the simplest way to query audit logs.
API
For programmatic access and SIEM integration, use the REST API.Real-time event monitoring
For real-time notifications instead of historical queries, use the WatchEvents API. This streaming endpoint pushes events as they occur. Use it for dashboards, automation triggers, and live monitoring.Key differences
| Feature | ListAuditLogs API | WatchEvents API |
|---|---|---|
| Purpose | Historical analysis | Real-time monitoring |
| Access | Organization Admins only | Users with read access to resources |
| Data | Full audit trail with actor info | Resource changes only |
| Format | Paginated queries | Streaming events |
| Use Case | Compliance, security review | Dashboards, automation |
WatchEvents with Python
Install the official SDK:The
GITPOD_API_KEY environment variable should contain your Personal Access Token. You only receive events for resources you have read access to.Event operations
RESOURCE_OPERATION_CREATE- Resource createdRESOURCE_OPERATION_UPDATE- Resource modifiedRESOURCE_OPERATION_UPDATE_STATUS- Status changed onlyRESOURCE_OPERATION_DELETE- Resource deleted
Other languages
For languages without an official SDK, use gRPC/Connect-compatible clients: Endpoint:POST https://app.gitpod.io/api/gitpod.v1.EventService/WatchEvents
Headers:
Content-Type: application/jsonAccept: application/jsonlAuthorization: Bearer YOUR_API_KEY
Common use cases
Security monitoring
Compliance reporting
Troubleshooting
Resource lifecycle tracking
Best practices
Regular monitoring- Export audit logs periodically to external storage for long-term retention
- Integrate with your SIEM for centralized security monitoring
- Establish baseline patterns and investigate anomalies
- Grant Organization Admin role only to users who need audit log access
- Use dedicated service accounts for automated log collection
- Rotate Personal Access Tokens regularly
- Prioritize monitoring security-sensitive resource types
- Combine multiple filter criteria to narrow results
- Export to JSON/YAML for integration with analysis tools
Limitations
- Retention: Audit logs are retained according to your organization’s data retention policy
- Rate limits: API requests subject to standard rate limiting
- Filter limits: Maximum 25 values per filter type per request
- Pagination: Maximum 100 entries per page