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

Overview

The Settings API allows administrators to view and modify Mission Control’s system configuration including retention policies, gateway settings, and feature toggles. Settings are organized into categories:
  • retention: Data retention periods for activities, logs, and other records
  • gateway: Gateway connection configuration
  • general: System-wide settings including backups and cleanup

Get All Settings

curl -X GET https://your-domain.com/api/settings \
  -H "Cookie: mc-session=YOUR_SESSION_TOKEN"

Response

settings
array
Array of all setting objects
key
string
required
Setting key (e.g., retention.activities_days)
value
string
required
Current value
description
string
Human-readable description
category
string
required
Setting category (retention, gateway, general)
updated_by
string
Username of last modifier
updated_at
integer
Unix timestamp of last update
is_default
boolean
required
Whether this setting is at its default value
grouped
object
Settings organized by category for easier navigation

Available Settings

Retention Settings

  • retention.activities_days - Days to keep activity records (default: 90)
  • retention.audit_log_days - Days to keep audit log entries (default: 180)
  • retention.logs_days - Days to keep log files (default: 30)
  • retention.notifications_days - Days to keep notifications (default: 30)
  • retention.pipeline_runs_days - Days to keep pipeline run history (default: 90)
  • retention.token_usage_days - Days to keep token usage data (default: 90)

Gateway Settings

  • gateway.host - Gateway hostname
  • gateway.port - Gateway port number

General Settings

  • general.site_name - Mission Control display name (default: “Mission Control”)
  • general.auto_cleanup - Enable automatic data cleanup (default: false)
  • general.auto_backup - Enable automatic daily backups (default: false)
  • general.backup_retention_count - Number of backup files to keep (default: 10)

Update Settings

curl -X PUT https://your-domain.com/api/settings \
  -H "Cookie: mc-session=YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": {
      "retention.activities_days": "60",
      "general.auto_backup": "true",
      "general.backup_retention_count": "15"
    }
  }'

Request Body

settings
object
required
Map of setting keys to new values. All values should be strings.

Response

updated
array
Array of setting keys that were updated
count
integer
Number of settings updated
Changes are logged to the audit trail with before/after values.

Reset Setting to Default

Delete a custom setting value to restore its default.
curl -X DELETE https://your-domain.com/api/settings \
  -H "Cookie: mc-session=YOUR_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "retention.activities_days"}'

Request Body

key
string
required
Setting key to reset (e.g., retention.activities_days)

Response

reset
string
The key that was reset
default_value
string
The default value that will now be used

Error Responses

401 Unauthorized
User is not authenticated. Check session cookie.
403 Forbidden
User does not have admin role. Only admins can manage settings.
404 Not Found
Setting not found (DELETE only)
429 Too Many Requests
Rate limit exceeded. Wait before retrying.