REST API Documentation
Complete reference for the Akmatori REST API. Most endpoints require authentication via JWT token or API key, while alert webhooks and API docs are public.
Authentication
All API requests must include authentication. You can use either a JWT token or an API key.
# Using Bearer Token
curl -H "Authorization: Bearer <your-jwt-token>" \
https://your-instance/api/incidents
# Using API Key
curl -H "X-API-Key: <your-api-key>" \
https://your-instance/api/incidents/api/docs, /api/openapi.yaml, and alert webhooks do not require auth. Base URL
https://your-akmatori-instance/api/api/docs on your Akmatori instance for an interactive Swagger UI where you can explore and test all endpoints directly. Endpoints
Incidents
/incidentsList incidents with pagination and optional Unix timestamp filters (page, per_page, from, to)
/incidents/:uuidGet a specific incident by UUID, including execution state and logs
/incidentsCreate and start a new API-driven incident. Request body requires task and may include optional context.
Skills
/skillsList all available skills
/skillsCreate a new skill
/skills/:nameGet skill details by name
/skills/:nameUpdate skill configuration
/skills/:nameDelete a skill (user-created only)
/skills/:name/promptGet skill prompt content
/skills/:name/promptUpdate skill prompt
/skills/:name/toolsList tools assigned to a skill
/skills/:name/toolsAssign tool instances to a skill
/skills/:name/scriptsList skill scripts
/skills/:name/scriptsClear all scripts for a skill
/skills/:name/scripts/:filenameGet a specific script by filename
/skills/:name/scripts/:filenameCreate or update a skill script
/skills/:name/scripts/:filenameDelete a specific script
/skills/syncSync skills from filesystem to database
Tools
/tool-typesList available tool types
/toolsList configured tool instances
/toolsCreate a new tool instance
/tools/:idGet tool instance details
/tools/:idUpdate tool configuration
/tools/:idDelete a tool instance
/tools/:id/ssh-keysList SSH keys for an SSH tool
/tools/:id/ssh-keysAdd an SSH key to a tool
/tools/:id/ssh-keys/:keyIdUpdate an SSH key
/tools/:id/ssh-keys/:keyIdDelete an SSH key
Alert Sources
/alert-source-typesList supported alert source types
/alert-sourcesList configured alert sources
/alert-sourcesCreate a new alert source
/alert-sources/:uuidGet alert source details by UUID
/alert-sources/:uuidUpdate alert source configuration
/alert-sources/:uuidDelete an alert source
Context Files
/contextList all context files
/contextUpload a new context file (multipart form)
/context/:idGet context file metadata
/context/:id/downloadDownload context file content
/context/:idDelete a context file
/context/validateValidate context file references in text
Runbooks
/runbooksList all runbooks for AI-guided incident investigation
/runbooksCreate a new runbook (title, content)
/runbooks/:idGet runbook details by ID
/runbooks/:idUpdate runbook title and content
/runbooks/:idDelete a runbook
HTTP Connectors
/http-connectorsList all HTTP connectors for external API integration
/http-connectorsCreate a new HTTP connector with tool definitions
/http-connectors/:idGet HTTP connector details by ID
/http-connectors/:idUpdate HTTP connector configuration
/http-connectors/:idDelete an HTTP connector
MCP Servers
/mcp-serversList all MCP server configurations for external tool proxying
/mcp-serversRegister a new MCP server (stdio or SSE transport)
/mcp-servers/:idGet MCP server configuration by ID
/mcp-servers/:idUpdate MCP server configuration
/mcp-servers/:idDelete an MCP server registration
Settings
/settings/generalGet general settings (base URL for links in notifications)
/settings/generalUpdate general settings
/settings/slackGet Slack integration settings
/settings/slackUpdate Slack integration settings
/settings/llmGet LLM provider configuration (supports OpenAI, Anthropic, Google, OpenRouter, custom)
/settings/llmUpdate LLM provider configuration and set active provider
/settings/proxyGet proxy configuration, including per-service support and enablement for LLM, Slack, Zabbix, VictoriaMetrics, Catchpoint, Grafana, PagerDuty, NetBox, and Kubernetes connectivity
/settings/proxyUpdate shared proxy configuration and per-service proxy toggles for supported integrations
/settings/retentionGet automated incident cleanup settings, including retention window and cleanup interval
/settings/retentionUpdate retention policy configuration for automated incident data cleanup
Webhooks
/webhook/alert/:uuidReceive alerts from monitoring systems (no auth required)
API Documentation
/docsInteractive Swagger UI for exploring and testing API endpoints
/openapi.yamlOpenAPI 3.0 specification in YAML format
Pagination
List endpoints support pagination via page and per_page query parameters. Default: page=1, per_page=50. Maximum per_page is 200.
# Get page 2 with 25 items per page
curl -H "Authorization: Bearer <token>" \
"https://your-instance/api/incidents?page=2&per_page=25"
# Filter by date range (Unix timestamps)
curl -H "Authorization: Bearer <token>" \
"https://your-instance/api/incidents?from=1709251200&to=1709337600"When using pagination, the response wraps data with metadata:
{
"data": [...],
"pagination": {
"page": 2,
"per_page": 25,
"total": 147,
"total_pages": 6
}
}Example Request
curl -X POST https://your-instance/api/incidents \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"task": "Investigate sustained CPU saturation on web-server-01 and summarize likely root cause",
"context": {
"host": "web-server-01",
"severity": "critical",
"environment": "production"
}
}'Error Responses
400Bad Request - Invalid parameters401Unauthorized - Invalid or missing token404Not Found - Resource doesn't exist500Internal Error - Server error