API Referencev1

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.

bash
# 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
Generate API keys in Settings → API Keys. Tokens expire after 24 hours.

Base URL

text
https://your-akmatori-instance/api

Endpoints

Incidents

GET/incidents

List all incidents with optional filters

GET/incidents/:id

Get a specific incident by ID

POST/incidents

Create and run a new incident investigation

Skills

GET/skills

List all available skills

GET/skills/:name

Get skill details by name

POST/skills/:name

Update skill content and configuration

POST/skills/sync

Sync skills from filesystem to database

Tools

GET/tool-types

List available tool types

GET/tools

List configured tool instances

POST/tools

Create a new tool instance

PUT/tools/:id

Update tool configuration

DELETE/tools/:id

Delete a tool instance

Alert Sources

GET/alert-source-types

List supported alert source types

GET/alert-sources

List configured alert sources

POST/alert-sources

Create a new alert source

Webhooks

POST/webhook/alert/:uuid

Receive alerts from monitoring systems (no auth required)

Example Request

Create Incident
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 parameters
401Unauthorized - Invalid or missing token
404Not Found - Resource doesn't exist
500Internal Error - Server error