REST API Documentation
Complete reference for the Akmatori REST API. All endpoints require authentication via JWT token or API key.
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/incidentsBase 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 optional filters and pagination (page, per_page, from, to)
/incidents/:idGet a specific incident by ID
/incidentsCreate and run a new incident investigation
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
Incident Alerts
/incidents/:uuid/alertsList alerts attached to an incident
/incidents/:uuid/alertsAttach an alert to an incident
/incidents/:uuid/alerts/:alertIdDetach an alert from an incident
/incidents/:uuid/mergeMerge another incident into this one
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
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
/settings/proxyUpdate proxy configuration
/settings/aggregationGet alert aggregation settings
/settings/aggregationUpdate alert aggregation settings
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 '{
"title": "High CPU on web-server-01",
"description": "CPU usage above 90% for 5 minutes",
"skill": "investigate-high-cpu",
"context": {
"host": "web-server-01",
"severity": "critical"
}
}'Error Responses
400Bad Request - Invalid parameters401Unauthorized - Invalid or missing token404Not Found - Resource doesn't exist500Internal Error - Server error