Overview
The Audit Log API provides access to Mission Control’s comprehensive security and activity audit trail. All administrative actions, configuration changes, and system events are automatically logged with actor information, timestamps, and contextual details. Audit events are retained based on theretention.audit_log_days setting (default: 180 days).
Query Audit Log
Search and filter audit events with flexible query parameters.Query Parameters
Filter by action type (e.g.,
settings_update, backup_create, user_created)Filter by actor username (e.g.,
admin, scheduler)Maximum number of events to return (max: 10000)
Number of events to skip for pagination
Unix timestamp - only return events created after this time
Unix timestamp - only return events created before this time
Response
Array of audit event objects sorted by creation time (newest first)
Unique event identifier
Action type (see Event Types section)
Username of the user or system process that performed the action
User ID of the actor (null for system actors)
Action-specific contextual data (parsed from JSON)
IP address of the actor (for user actions)
Unix timestamp of event creation
Total count of events matching the query (before pagination)
Limit value used in the query
Offset value used in the query
Example Response
Event Types
Audit events are categorized by action type. Each type has specific detail fields.Authentication & User Management
login
User login event
- actor: Username
- detail: Object with success boolean
logout
User logout event
- actor: Username
user_created
New user account created
- actor: Admin username
- detail:
user_updated
User account modified
- actor: Admin username
- detail:
user_deleted
User account deleted
- actor: Admin username
- detail:
Settings & Configuration
settings_update
System settings modified
- actor: Admin username
- detail: Object with updated keys array and changes object
settings_reset
Setting reset to default value
- actor: Admin username
- detail:
Backup & Maintenance
backup_create
Manual backup created via API
- actor: Admin username
- detail:
backup_delete
Backup file deleted
- actor: Admin username
- detail:
auto_backup
Scheduled automatic backup
- actor:
scheduler - detail:
auto_cleanup
Scheduled data cleanup
- actor:
scheduler - detail:
Agents & Tasks
agent_created
New agent registered
- actor: Username or
system - detail:
agent_deleted
Agent removed
- actor: Admin username
- detail:
heartbeat_check
Scheduled heartbeat check marked agents offline
- actor:
scheduler - detail: Object with marked_offline array
task_created
New task created
- actor: Username
- detail:
task_assigned
Task assigned to agent
- actor: Username
- detail:
Pagination Example
Query large audit logs using offset-based pagination:Time Range Queries
Query events within a specific time window:Actor Filtering
Track actions by specific users or system processes:Error Responses
400 Bad Request
Invalid query parameters (e.g., limit exceeds maximum)
401 Unauthorized
User is not authenticated. Check session cookie.
403 Forbidden
User does not have admin role. Only admins can access audit logs.
Audit Log Retention
Audit events are automatically cleaned up based on theretention.audit_log_days setting:
- Default retention: 180 days
- Cleanup runs daily at 4:00 AM UTC when
general.auto_cleanupis enabled - Change retention period via Settings API:
Security Considerations
- Access Control: Only admin users can query audit logs
- IP Logging: User actions include source IP addresses
- Immutable Records: Audit events cannot be modified or deleted via API
- Tamper Detection: Monitor
settings_updateevents for unauthorized configuration changes - Compliance: Retain logs for regulatory requirements using the retention setting