Skip to main content

Base URL

http://<operator-host>:8090/api/v1
The ChatCLI AIOps Platform REST API provides full programmatic access to all platform features, including incident management, SLOs, runbooks, approvals, postmortems, analytics, and auditing.

Authentication

All requests must include the X-API-Key header with a valid key.
curl -H "X-API-Key: your-token-here" \
  http://operator:8090/api/v1/incidents

Roles

RoleDescriptionPermissions
viewerRead-onlyGET on all endpoints
operatorOperatorGET + POST (acknowledge, approve, reject)
adminAdministratorFull access (GET, POST, PUT, DELETE)
API keys are configured in the operator’s ConfigMap:
apiVersion: v1
kind: ConfigMap
metadata:
  name: chatcli-operator-config
data:
  api-keys: |
    - key: "ck_live_abc123..."
      role: admin
      description: "CI/CD Pipeline"
    - key: "ck_live_def456..."
      role: operator
      description: "NOC Team"

Rate Limiting

PlanLimitWindow
Default100 reqper minute
Operator500 reqper minute
Admin1000 reqper minute
Rate limit headers returned in each response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1710864000

Response Format

All responses follow a Kubernetes-like pattern:
{
  "apiVersion": "v1",
  "kind": "ResourceType",
  "metadata": {
    "totalCount": 42,
    "page": 1,
    "pageSize": 20
  },
  "items": [...]
}
For individual resources:
{
  "apiVersion": "v1",
  "kind": "Incident",
  "metadata": {
    "name": "INC-20260319-001",
    "namespace": "production",
    "createdAt": "2026-03-19T15:20:00Z"
  },
  "spec": {...},
  "status": {...}
}

Error Codes

CodeDescription
400Bad request — missing or malformed parameters
401Unauthenticated — X-API-Key missing or invalid
403Forbidden — insufficient role for the operation
404Resource not found
409Conflict — resource already exists or invalid state for the operation
429Rate limit exceeded
500Internal server error
Error response example:
{
  "apiVersion": "v1",
  "kind": "Error",
  "error": {
    "code": 401,
    "message": "Invalid or missing API key",
    "details": "Include the X-API-Key header with a valid key"
  }
}

Pagination

Endpoints that return lists support pagination via query parameters:
  • page — Page number (default: 1)
  • pageSize — Items per page (default: 20, maximum: 100)
curl -H "X-API-Key: $KEY" \
  "http://operator:8090/api/v1/incidents?page=2&pageSize=50"

Versioning

The API uses path-based versioning (/api/v1/). Future versions will be added as /api/v2/ while maintaining backward compatibility with v1.