Skip to content

System Configuration API

Runtime settings can be managed via the System Configuration API, overriding environment variables for supported settings. Changes apply immediately without a restart and persist to the database.

API Endpoints

MethodPathPermissionDescription
GET/api/v1/system/configsystem:readGet current runtime config
PUT/api/v1/system/configsystem:writeUpdate config fields

Get Configuration

sh
curl -b cookies.txt http://localhost:8080/api/v1/system/config

Returns all configurable fields with their current values. Secrets (google_client_secret, oidc_client_secret) are never returned; instead, google_client_secret_set and oidc_client_secret_set booleans indicate whether a secret is configured. The response includes updated_at (RFC 3339) when config has been modified via PUT.

Update Configuration

sh
curl -b cookies.txt -X PUT http://localhost:8080/api/v1/system/config \
  -H "Content-Type: application/json" \
  -H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
  -d '{
    "correlation_window": "5m",
    "investigation_timeout": "15m",
    "max_concurrent_investigations": 5
  }'

Update Semantics

  • Empty or omitted fields are left unchanged (partial update).
  • If no recognized fields are set, the response is "no changes".
  • log_level re-initializes the logger immediately on change.
  • Auth secrets (google_client_secret, oidc_client_secret) are encrypted via AES-256-GCM before database persistence. An empty string means "leave unchanged" since secrets are never returned on GET.
  • Each successful PUT writes an audit log entry (system_config_updated).
  • API overrides take precedence over environment variables and persist across restarts (loaded from DB on startup).

Configurable Settings

Core Pipeline

FieldTypeConstraintsDescription
log_levelstringdebug, info, warn, error, fatalRuntime log level; re-initializes logger immediately
session_expiry_hoursint> 0, <= 720Session lifetime in hours
max_concurrent_investigationsint> 0Per-agent investigation capacity
correlation_windowdurationGo duration stringAlert correlation time window
correlation_cooldown_ttldurationGo duration stringCooldown after investigation publish
investigation_timeoutdurationGo duration stringMax investigation duration before timeout

Agent & Scheduler

FieldTypeConstraintsDescription
agent_presence_ttldurationGo duration stringAgent SSE presence TTL
agent_disconnect_gracedurationGo duration stringGrace period after agent SSE disconnect
scheduler_leader_ttldurationGo duration stringLeader lease TTL for scheduler election

Slack Incident Channels

FieldTypeConstraintsDescription
slack_incident_channels_enabledboolEnable automatic Slack incident channels
slack_incident_channel_visibilitystringpublic, privateChannel visibility
slack_incident_channel_trigger_statusstringactive, detectedIncident status that triggers channel creation
slack_incident_channel_archive_on_closeboolArchive channel when incident closes

Incident Summaries

FieldTypeConstraintsDescription
incident_summary_enabledboolEnable periodic incident summary generation
incident_summary_intervaldurationGo duration stringDefault summary cadence
incident_summary_intervalsmap[severity]durationGo duration string valuesPer-severity cadence overrides (replaces all overrides when provided)

Authentication — Google OAuth

FieldTypeConstraintsDescription
google_oauth_enabledboolEnable Google Sign-In
google_client_idstringGoogle OAuth client ID
google_client_secretstringNon-empty to updateGoogle OAuth client secret (never returned on GET)
google_oauth_redirect_urlstringOverride callback URL

Authentication — OIDC

FieldTypeConstraintsDescription
oidc_enabledboolEnable generic OIDC SSO
oidc_issuer_urlstringOIDC issuer discovery URL
oidc_client_idstringOIDC client ID
oidc_client_secretstringNon-empty to updateOIDC client secret (never returned on GET)
oidc_scopesstringSpace-separated OIDC scopes

Duration Format

All duration fields accept Go duration strings: 30s, 5m, 1h30m, 24h. Invalid durations return a 400 validation error.

Settings Not Configurable via API

Settings not listed here (database URLs, ENCRYPTION_KEYS, SECRET_PEPPER, RABBITMQ_URI, VALKEY_ADDR, SMTP credentials) must be configured via environment variables and require a restart.

See Also

Released under the MIT License.