Skip to main content

Overview

The Activities API provides a comprehensive audit trail of all actions performed in Mission Control. Activities track entity changes (agents, tasks, comments) with full context including actor, timestamp, and related entity details.

List Activities

Activities are scoped to your workspace and include enhanced entity relationships.

GET /api/activities

Retrieve paginated activity stream with optional filtering.

Query Parameters

string
Filter by activity type (e.g., agent.created, task.updated, comment.added)
string
Filter by actor name (agent or user who performed the action)
string
Filter by entity type: task, agent, comment
integer
Unix timestamp for real-time updates. Returns only activities created after this time.
integer
default:"50"
Number of activities to return (max 500)
integer
default:"0"
Pagination offset

Response

array
Array of activity records with enhanced entity details
integer
Activity ID
string
Activity type (e.g., task.status_changed, agent.created)
string
Name of user or agent who performed the action
string
Type of entity affected: task, agent, comment
integer
ID of the affected entity
object
Additional context (parsed from JSON)
object
Enhanced entity details fetched from related tables
string
Entity type
integer
Entity ID
string
Task title (for task entities)
string
Agent name (for agent entities)
string
Current status
integer
Unix timestamp
integer
Total number of matching activities
boolean
Whether more results are available

Response Example

Activity Statistics

GET /api/activities?stats=true

Get aggregated activity statistics over a time period.

Query Parameters

boolean
required
Set to true to request statistics instead of raw activities
integer
default:"24"
Time window in hours for statistics

Response

string
Human-readable timeframe (e.g., “24 hours”)
array
Activity counts grouped by type
string
Activity type
integer
Number of occurrences
array
Most active agents/users
string
Actor name
integer
Number of activities
array
Hourly activity distribution
integer
Hour bucket timestamp
integer
Activities in this hour
string
ISO 8601 timestamp

Stats Response Example

Real-Time Polling

Use the since parameter to implement efficient real-time polling:

Common Activity Types

  • task.created - New task created
  • task.updated - Task fields updated
  • task.status_changed - Task moved to different status
  • task.assigned - Task assigned to agent
  • agent.created - New agent provisioned
  • agent.updated - Agent configuration changed
  • agent.status_changed - Agent went online/offline
  • comment.added - Comment added to task
  • user.login - User logged in
  • webhook.triggered - Webhook fired

Error Responses

string
Error message