Skip to content

API Reference

All endpoints are relative to http://your-alga-host:8080.

Authentication Model

Alga supports four authentication mechanisms. Every route falls into exactly one category.

Operator/UI endpoints require an HTTP-only session cookie (alga_session). State-changing methods (POST, PUT, PATCH, DELETE) must include the X-CSRF-Token header matching the alga_csrf cookie value.

sh
# Login and save cookies
curl -c cookies.txt -X POST http://localhost:8080/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "admin@alga.local", "password": "your-password"}'

# Use session for subsequent requests
curl -b cookies.txt http://localhost:8080/api/v1/alerts

# State-changing request requires CSRF header
curl -b cookies.txt -X POST http://localhost:8080/api/v1/incidents \
  -H "X-CSRF-Token: <value-from-alga_csrf-cookie>" \
  -H "Content-Type: application/json" \
  -d '{"title": "..."}'

Personal Access Tokens (PAT)

PATs (alga_pat_...) authenticate the same operator endpoints without cookies or CSRF. Effective permissions are the intersection of the PAT's granted scopes and the user's role permissions.

sh
curl http://localhost:8080/api/v1/alerts \
  -H "Authorization: Bearer alga_pat_..."

Agent Bearer Tokens

Agent endpoints use agent bearer tokens (alga_agent_...) and are rate-limited per agent. Agents have capability-based access (investigate, communicate, command).

sh
curl http://localhost:8080/api/v1/agent/alerts \
  -H "Authorization: Bearer alga_agent_..."

Idempotency

The following endpoints accept an Idempotency-Key header on POST to prevent duplicate operations:

  • POST /api/v1/incidents
  • POST /api/v1/agent/messages
  • POST /api/v1/users/me/notification-preferences/test

Public Routes (No Auth)

These endpoints require no authentication. Some are rate-limited.

Health & Metrics

MethodPathDescription
GET/metricsPrometheus-format metrics
ANY/liveLiveness probe
ANY/readyReadiness probe
ANY/healthHealth check
ANY/api/v1/readinessPipeline readiness + scheduler/correlator snapshot

Initial Setup

MethodPathDescription
ANY/api/v1/setup/statusCheck if initial setup is complete (rate limited)
ANY/api/v1/setupRun initial setup (rate limited)

Authentication Endpoints

MethodPathDescription
POST/api/v1/auth/loginLogin with email and password
POST/api/v1/auth/logoutLogout and clear session
POST/api/v1/auth/refreshRefresh session token
POST/api/v1/auth/forgot-passwordRequest password reset email
POST/api/v1/auth/reset-passwordReset password with token
GET/api/v1/auth/google/enabledCheck if Google Sign-In is enabled
ANY/api/v1/auth/googleStart Google OAuth flow
ANY/api/v1/auth/google/callbackGoogle OAuth callback
GET/api/v1/auth/slack/enabledCheck if Slack Sign-In is enabled
ANY/api/v1/auth/slackStart Slack Sign-In OAuth flow
ANY/api/v1/auth/slack/callbackSlack Sign-In OAuth callback
ANY/api/v1/auth/oidc/providersList enabled OIDC SSO providers (public view)
ANY/api/v1/auth/oidc/{id}/authorizeStart OIDC SSO flow for provider
ANY/api/v1/auth/oidc/{id}/callbackOIDC SSO callback

External Callbacks

MethodPathDescription
ANY/api/v1/twilio/callbackTwilio voice call IVR callback (Twilio signature verified)
ANY/api/v1/telnyx/callbackTelnyx voice call IVR callback (Ed25519 signature verified)
ANY/api/v1/integrations/slack/oauth/callbackSlack workspace OAuth callback
ANY/api/v1/users/me/slack/callbackUser Slack account linking callback
ANY/api/v1/users/me/google/callbackUser Google account linking callback

Heartbeat Ping

MethodPathDescription
ANY/api/v1/heartbeats/ping/{token}Dead-man's-switch ping (token in URL authenticates)

Internal

MethodPathDescription
ANY/internal/mm-pluginServes Mattermost plugin tarball

Authenticated Routes (Session/PAT, No Specific RBAC)

These endpoints require a valid session or PAT but do not enforce a specific RBAC permission beyond basic authentication.

Current User & Profile

MethodPathDescription
GET/api/v1/auth/meGet current user info
POST/api/v1/auth/change-passwordChange password
POST/api/v1/auth/change-emailChange email address
POST/api/v1/auth/profileUpdate display name / profile

Alerts

MethodPathDescription
GET/api/v1/alertsList alerts (query: status, channel, provider, severity, search, start_date, end_date, limit, skip)
POST/api/v1/alertsCreate manual alert
GET/api/v1/alerts/{number}Get alert by alert number
PATCH/api/v1/alerts/{number}Update alert fields
POST/api/v1/alerts/{number}/acknowledgeAcknowledge alert
POST/api/v1/alerts/{number}/resolveResolve alert
POST/api/v1/alerts/{number}/reopenReopen resolved alert
POST/api/v1/alerts/{number}/investigateTrigger AI investigation
DELETE/api/v1/alerts/{number}Delete alert

Incidents

MethodPathDescription
GET/api/v1/incidents/metricsAggregate metrics (MTTA, MTTR, MTTM, SLA)
GET/api/v1/incidentsList incidents (status, severity, service_id, commander_id, search, dates)
POST/api/v1/incidentsCreate manual incident (supports Idempotency-Key)
GET/api/v1/incidents/{id}Get incident with timeline, roles, linked items
PATCH/api/v1/incidents/{id}Update (title, description, severity, custom_fields)
DELETE/api/v1/incidents/{id}Delete incident

Incident Lifecycle Commands

MethodPathDescription
POST/api/v1/incidents/{id}/acknowledgeAcknowledge (stops escalation)
POST/api/v1/incidents/{id}/mitigateMark mitigated
POST/api/v1/incidents/{id}/resolveMark resolved
POST/api/v1/incidents/{id}/closeMark closed
POST/api/v1/incidents/{id}/reopenReopen resolved/mitigated/closed
POST/api/v1/incidents/{id}/cancelCancel (false alarm)
POST/api/v1/incidents/{id}/escalateManual escalation trigger
POST/api/v1/incidents/{id}/request-summaryRequest AI-generated summary
POST/api/v1/incidents/{id}/begin-triageBegin triage
POST/api/v1/incidents/{id}/promotePromote to active

Incident Coordination

MethodPathDescription
GET/api/v1/incidents/{id}/coordination/messagesList coordination messages
POST/api/v1/incidents/{id}/coordination/messagesAdd coordination message
GET/api/v1/incidents/{id}/coordination/tasksList coordination tasks
POST/api/v1/incidents/{id}/coordination/tasksCreate a coordination task
PATCH/api/v1/incidents/{id}/coordination/tasks/{taskId}Update coordination task

Incident Status Updates

MethodPathDescription
GET/api/v1/incidents/{id}/status-updatesList status updates
POST/api/v1/incidents/{id}/status-updatesCreate status update

Incident Channels & War Rooms

MethodPathDescription
POST/api/v1/incidents/{id}/slack-channelCreate/link a Slack incident channel
DELETE/api/v1/incidents/{id}/slack-channelUnlink Slack channel
POST/api/v1/incidents/{id}/google-meetCreate/link a Google Meet war room
DELETE/api/v1/incidents/{id}/google-meetUnlink Google Meet war room

Incident Linked Items

MethodPathDescription
GET/api/v1/incidents/{id}/alertsList linked alerts
POST/api/v1/incidents/{id}/alertsLink alert
DELETE/api/v1/incidents/{id}/alerts/{alertNumber}Unlink alert
GET/api/v1/incidents/{id}/timelineGet structured timeline
POST/api/v1/incidents/{id}/timelineAdd manual timeline entry
GET/api/v1/incidents/{id}/investigationsList investigations under incident

Incident Post-Mortem

MethodPathDescription
GET/api/v1/incidents/{id}/post-mortemGet post-mortem
POST/api/v1/incidents/{id}/post-mortemCreate post-mortem
PATCH/api/v1/incidents/{id}/post-mortemUpdate post-mortem
DELETE/api/v1/incidents/{id}/post-mortemDelete post-mortem

ICS Roles & Document

MethodPathDescription
GET/api/v1/incidents/{id}/ics/rolesList ICS role assignments
POST/api/v1/incidents/{id}/ics/rolesAssign ICS role
PATCH/api/v1/incidents/{id}/ics/roles/{roleId}Update an ICS role assignment
GET/api/v1/incidents/{id}/ics/documentGet ICS document sections
PATCH/api/v1/incidents/{id}/ics/document/{section}Update ICS document section

Personal Access Tokens (Self)

MethodPathDescription
GET/api/v1/user/tokensList your PATs
POST/api/v1/user/tokensCreate PAT
DELETE/api/v1/user/tokens/{id}Revoke your PAT

Routes

MethodPathDescription
GET/api/v1/routesGet routing rules and default destinations
PUT/api/v1/routesSave routing rules

Knowledge

MethodPathDescription
GET/api/v1/knowledgeList/search knowledge notes
POST/api/v1/knowledgeCreate knowledge note
GET/api/v1/knowledge/{id}Get knowledge note
PUT/api/v1/knowledge/{id}Update knowledge note
DELETE/api/v1/knowledge/{id}Delete knowledge note

Memories

MethodPathDescription
GET/api/v1/memoriesList/search memories
POST/api/v1/memoriesCreate memory
GET/api/v1/memories/{id}Get memory
PUT/api/v1/memories/{id}Update memory
DELETE/api/v1/memories/{id}Delete memory

Credential Providers

MethodPathDescription
GET/api/v1/credential-providersList credential providers
POST/api/v1/credential-providersCreate provider
GET/api/v1/credential-providers/{id}Get provider
PATCH/api/v1/credential-providers/{id}Update provider
DELETE/api/v1/credential-providers/{id}Delete provider

Shared Secrets

MethodPathDescription
GET/api/v1/shared-secretsList shared secrets
POST/api/v1/shared-secretsCreate shared secret
GET/api/v1/shared-secrets/{id}Get shared secret
PATCH/api/v1/shared-secrets/{id}Update shared secret
DELETE/api/v1/shared-secrets/{id}Delete shared secret

Channels & Destinations

MethodPathDescription
GET/api/v1/channelsList Mattermost channels
GET/api/v1/destinationsList channels (supports ?provider=slack)

Integrations

MethodPathDescription
GET/api/v1/integrationsGet integration status
PUT/api/v1/integrationsUpdate integrations

Linked Provider Accounts (Self)

MethodPathDescription
GET/api/v1/users/me/slack/authorizeInitiate user-to-Slack linking
POST/api/v1/users/me/slack/disconnectDisconnect user's Slack account
GET/api/v1/users/me/google/authorizeInitiate user-to-Google linking
POST/api/v1/users/me/google/disconnectDisconnect user's Google account

Dashboard

MethodPathDescription
GET/api/v1/dashboard/statsAggregate dashboard counters
GET/api/v1/dashboard/daily-summaryDaily summary report

Notifications

MethodPathDescription
GET/api/v1/notificationsList notifications for current user
GET/api/v1/notifications/unread-countGet unread count
POST/api/v1/notifications/read-allMark all read
POST/api/v1/notifications/{id}/readMark one notification read

Notification Preferences

MethodPathDescription
GET/api/v1/users/me/notification-preferencesGet preferences
PUT/api/v1/users/me/notification-preferencesUpdate preferences
POST/api/v1/users/me/notification-preferences/testSend test notification (supports Idempotency-Key)

Action Items

MethodPathDescription
GET/api/v1/action-itemsAll open action items

Post-Mortems

MethodPathDescription
GET/api/v1/post-mortemsList all post-mortems

System Configuration

MethodPathDescription
GET/api/v1/system/configGet runtime system config
PUT/api/v1/system/configUpdate system config

Maintenance Windows

MethodPathDescription
GET/api/v1/maintenance-windowsList maintenance windows
POST/api/v1/maintenance-windowsCreate maintenance window
GET/api/v1/maintenance-windows/{id}Get maintenance window
PUT/api/v1/maintenance-windows/{id}Update maintenance window
DELETE/api/v1/maintenance-windows/{id}Delete maintenance window

Heartbeats (Authenticated)

MethodPathDescription
GET/api/v1/heartbeats/{id}Get heartbeat
PUT/api/v1/heartbeats/{id}Update heartbeat
DELETE/api/v1/heartbeats/{id}Delete heartbeat

Status Pages (Authenticated Sub-Routes)

MethodPathDescription
GET/api/v1/status-pages/{id}Get status page by ID
PATCH/api/v1/status-pages/{id}Update status page
DELETE/api/v1/status-pages/{id}Delete status page

Services

MethodPathDescription
GET/api/v1/servicesList services
POST/api/v1/servicesCreate service
GET/api/v1/services/{id}Get service (includes status, dependencies)
PATCH/api/v1/services/{id}Update service
DELETE/api/v1/services/{id}Delete service

Teams

MethodPathDescription
GET/api/v1/teamsList teams
POST/api/v1/teamsCreate team (auto-provisions an on-call schedule)
GET/api/v1/teams/{id}Get team (includes members, escalation policy, schedules)
PATCH/api/v1/teams/{id}Update team
DELETE/api/v1/teams/{id}Delete team

Escalation Policies

MethodPathDescription
GET/api/v1/escalation-policiesList escalation policies
POST/api/v1/escalation-policiesCreate policy
GET/api/v1/escalation-policies/{id}Get policy with levels and targets
PATCH/api/v1/escalation-policies/{id}Update policy
DELETE/api/v1/escalation-policies/{id}Delete policy

On-Call

MethodPathDescription
GET/api/v1/on-call/schedulesList schedules
GET/api/v1/on-call/schedules/{id}Get schedule with layers
PATCH/api/v1/on-call/schedules/{id}Update schedule layers
DELETE/api/v1/on-call/overrides/{id}Delete override
GET/api/v1/on-call/handoffsList handoffs
GET/api/v1/on-call/handoffs/{id}Get handoff
GET/api/v1/on-call/who-is-on-callGlobal on-call status
GET/api/v1/on-call/meMy current/pending shifts
GET/api/v1/on-call/my-on-callMy on-call shifts (alternate)
GET/api/v1/on-call/metricsPager load metrics per shift

Playbooks

MethodPathDescription
GET/api/v1/playbooksList playbooks (kind, service_id, tag, search)
POST/api/v1/playbooksCreate playbook
GET/api/v1/playbooks/{id}Get playbook with steps
PATCH/api/v1/playbooks/{id}Update playbook
DELETE/api/v1/playbooks/{id}Delete playbook

RBAC-Protected Routes

These endpoints require authentication plus the listed RBAC permission.

Alerts (RBAC)

MethodPathPermissionDescription
GET/api/v1/alerts/{number}/relatedalerts:readGet related alerts and linked incident
GET/api/v1/alerts/{number}/threadalerts:readGet alert discussion thread
POST/api/v1/alerts/{number}/thread/typingalerts:writeSend typing indicator to alert thread
POST/api/v1/alerts/{number}/thread/messagesalerts:writeAdd message to alert thread
PATCH/api/v1/alert-investigations/{id}/assignalerts:writeAssign investigation to an agent

Webhook Tokens

MethodPathPermissionDescription
GET/api/v1/webhook-tokenstokens:manageList webhook tokens
POST/api/v1/webhook-tokenstokens:manageCreate webhook token
DELETE/api/v1/webhook-tokens/{id}tokens:manageRevoke webhook token

Admin Tokens

MethodPathPermissionDescription
GET/api/v1/admin/tokenstokens:manageList all PATs
DELETE/api/v1/admin/tokens/{id}tokens:manageRevoke any PAT

Integrations (RBAC)

MethodPathPermissionDescription
POST/api/v1/integrations/testintegrations:testTest Mattermost or Slack connection
POST/api/v1/integrations/slack/oauth/authorizeintegrations:writeInitiate Slack OAuth flow
POST/api/v1/integrations/slack/disconnectintegrations:writeDisconnect Slack workspace

Users (Admin)

MethodPathPermissionDescription
GET/api/v1/usersusers:manageList users
POST/api/v1/usersusers:manageCreate user
PUT/api/v1/users/{id}users:manageUpdate user
DELETE/api/v1/users/{id}users:manageDelete user

Onboarding

MethodPathPermissionDescription
GET/api/v1/onboarding/statussystem:readCheck if onboarding wizard is completed
POST/api/v1/onboarding/completesystem:writeMark onboarding as completed

Heartbeats (RBAC)

MethodPathPermissionDescription
GET/api/v1/heartbeatsheartbeats:readList heartbeats
POST/api/v1/heartbeatsheartbeats:writeCreate heartbeat

Status Pages (RBAC)

MethodPathPermissionDescription
GET/api/v1/status-pagesstatuspages:readList status pages
POST/api/v1/status-pagesstatuspages:writeCreate status page

OIDC Providers (Admin)

MethodPathPermissionDescription
GET/api/v1/oidc/providersoidc:manageList configured OIDC providers
POST/api/v1/oidc/providersoidc:manageCreate provider

Incidents (RBAC)

MethodPathPermissionDescription
GET/api/v1/incidents/{id}/threadincidents:readGet incident investigation thread
POST/api/v1/incidents/{id}/thread/messagesincidents:writeAdd thread message
PATCH/api/v1/incident-investigations/{id}/assignincidents:writeAssign incident investigation to an agent

Triage

MethodPathPermissionDescription
GET/api/v1/triage/rulestriage:readList triage rules
POST/api/v1/triage/rulestriage:writeCreate triage rule
PUT/api/v1/triage/rules/reordertriage:writeReorder triage rules
GET/api/v1/triage/resultstriage:readList triage results
GET/api/v1/triage/statstriage:readGet triage accuracy stats

Investigations (Admin)

MethodPathPermissionDescription
GET/api/v1/investigations/dead-letteredadmin:accessList dead-lettered investigations

Agent Routes (Bearer Token)

All agent endpoints require agent bearer token auth (alga_agent_...) and are rate-limited per agent. Access is further gated by agent capabilities (investigate, communicate, command).

Operator-Facing Agent Management

These endpoints are used by operators to manage agents. They require session/PAT auth with tokens:manage.

MethodPathPermissionDescription
GET/api/v1/agent-tokenstokens:manageList agent tokens (with online presence)
POST/api/v1/agent-tokenstokens:manageCreate agent token
PUT/api/v1/agent-tokens/{id}tokens:manageUpdate agent config (enabled, scope, label_selectors)
DELETE/api/v1/agent-tokens/{id}tokens:manageRevoke agent token
GET/api/v1/agent-tokens/{id}/chat/messagestokens:manageGet agent DM history
POST/api/v1/agent-tokens/{id}/chat/messagestokens:manageSend message to agent
GET/api/v1/agent/capabilitiestokens:manageList available agent capabilities

Agent-Facing REST API

These endpoints are called by agents using their bearer token.

Alerts

MethodPathDescription
GET/api/v1/agent/alertsList alerts
GET/api/v1/agent/alerts/{fingerprint}Get alert by fingerprint
POST/api/v1/agent/alerts/{fingerprint}/resolveResolve alert
POST/api/v1/agent/alerts/{fingerprint}/reopenReopen alert

Memories

MethodPathDescription
GET/api/v1/agent/memoriesList/search memories
POST/api/v1/agent/memoriesCreate memory

Communication

MethodPathDescription
GET/api/v1/agent/peer-askList peer asks
POST/api/v1/agent/peer-askAsk another agent for help
GET/api/v1/agent/eventsSSE stream (investigation dispatch, chat, peer findings)
POST/api/v1/agent/messagesSend a text message or invoke an agent tool (supports Idempotency-Key)
POST/api/v1/agent/draftsStore an unsent draft
POST/api/v1/agent/typingTyping indicator
POST/api/v1/agent/heartbeatRenew SSE presence lease

Playbooks & Knowledge

MethodPathDescription
GET/api/v1/agent/playbooksList playbooks
GET/api/v1/agent/knowledgeList/search knowledge notes

Incidents

MethodPathDescription
GET/api/v1/agent/incidents/{id}Get incident context (only if assigned)
GET/api/v1/agent/incidents/{id}/timelineGet incident timeline
GET/api/v1/agent/incidents/{id}/tasksList coordination tasks for incident

Services & On-Call

MethodPathDescription
GET/api/v1/agent/servicesList services
GET/api/v1/agent/on-call/currentWho is on call

Secrets

MethodPathDescription
GET/api/v1/agent/secrets/{id}Fetch a shared secret the agent is authorized to read

Agent tools via messages

Agent capabilities like assigning roles, triggering escalation, publishing status updates, and promoting incidents are invoked by posting to /api/v1/agent/messages with kind: "inv_tool". See the Agent SDKs for the command factory helpers.


RBAC Permissions

Alga defines 53 granular permissions organized by resource domain.

DomainPermissions
Alertsalerts:read, alerts:write, alerts:delete
Knowledgeknowledge:read, knowledge:write, knowledge:delete
Routesroutes:read, routes:write
Integrationsintegrations:read, integrations:write, integrations:test
Usersusers:manage
Tokenstokens:manage
Dashboarddashboard:read
Channelschannels:read
Auditaudit:read
Notificationsnotifications:read, notifications:write
Memoriesmemories:read, memories:write, memories:delete
Systemsystem:read, system:write
Triagetriage:read, triage:write, triage:override
Incidentsincidents:read, incidents:write, incidents:command, incidents:delete
Servicesservices:read, services:write
On-Calloncall:read, oncall:write
Escalationescalation:read, escalation:write
Post-Mortemspostmortems:read, postmortems:write, postmortems:delete
Playbooksplaybooks:read, playbooks:write, playbooks:delete
Heartbeatsheartbeats:read, heartbeats:write, heartbeats:delete
Status Pagesstatuspages:read, statuspages:write, statuspages:delete
OIDCoidc:manage
Credentialscredentials:manage, credentials:read
Adminadmin:access

Roles

RoleScope
adminAll 53 permissions
operatorMost read/write permissions; no delete, users:manage, tokens:manage, system:read/write, admin:access, or oidc:manage
viewerRead-only permissions across all domains

Released under the MIT License.