Skip to main content
All audit log endpoints require admin role. Unauthorized users will receive a 403 Forbidden response.

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 the retention.audit_log_days setting (default: 180 days).

Query Audit Log

Search and filter audit events with flexible query parameters.

Query Parameters

string
Filter by action type (e.g., settings_update, backup_create, user_created)
string
Filter by actor username (e.g., admin, scheduler)
integer
default:"1000"
Maximum number of events to return (max: 10000)
integer
default:"0"
Number of events to skip for pagination
integer
Unix timestamp - only return events created after this time
integer
Unix timestamp - only return events created before this time

Response

array
required
Array of audit event objects sorted by creation time (newest first)
integer
required
Unique event identifier
string
required
Action type (see Event Types section)
string
required
Username of the user or system process that performed the action
integer
User ID of the actor (null for system actors)
object
Action-specific contextual data (parsed from JSON)
string
IP address of the actor (for user actions)
integer
required
Unix timestamp of event creation
integer
required
Total count of events matching the query (before pagination)
integer
required
Limit value used in the query
integer
required
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

User login event
  • actor: Username
  • detail: Object with success boolean
User logout event
  • actor: Username
New user account created
  • actor: Admin username
  • detail:
User account modified
  • actor: Admin username
  • detail:
User account deleted
  • actor: Admin username
  • detail:

Settings & Configuration

System settings modified
  • actor: Admin username
  • detail: Object with updated keys array and changes object
Setting reset to default value
  • actor: Admin username
  • detail:

Backup & Maintenance

Manual backup created via API
  • actor: Admin username
  • detail:
Backup file deleted
  • actor: Admin username
  • detail:
Scheduled automatic backup
  • actor: scheduler
  • detail:
Scheduled data cleanup
  • actor: scheduler
  • detail:

Agents & Tasks

New agent registered
  • actor: Username or system
  • detail:
Agent removed
  • actor: Admin username
  • detail:
Scheduled heartbeat check marked agents offline
  • actor: scheduler
  • detail: Object with marked_offline array
New task created
  • actor: Username
  • detail:
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

Invalid query parameters (e.g., limit exceeds maximum)
User is not authenticated. Check session cookie.
User does not have admin role. Only admins can access audit logs.

Audit Log Retention

Audit events are automatically cleaned up based on the retention.audit_log_days setting:
  • Default retention: 180 days
  • Cleanup runs daily at 4:00 AM UTC when general.auto_cleanup is enabled
  • Change retention period via Settings API:

Security Considerations

  1. Access Control: Only admin users can query audit logs
  2. IP Logging: User actions include source IP addresses
  3. Immutable Records: Audit events cannot be modified or deleted via API
  4. Tamper Detection: Monitor settings_update events for unauthorized configuration changes
  5. Compliance: Retain logs for regulatory requirements using the retention setting

Common Use Cases

Security Monitoring

Change Tracking

Backup Verification