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/apiEndpoints
Incidents
/incidentsList all incidents with optional filters
/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
Settings
/settings/slackGet Slack integration settings
/settings/slackUpdate Slack integration settings
/settings/openaiGet OpenAI/LLM configuration
/settings/openaiUpdate OpenAI/LLM configuration
/settings/openai/device-auth/startStart ChatGPT device authentication flow
/settings/openai/device-auth/statusCheck device authentication status
/settings/openai/device-auth/cancelCancel ongoing device authentication
/settings/openai/chatgpt/disconnectDisconnect ChatGPT subscription
/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)
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