Skip to main content
The AIOps Platform REST API lets you integrate any external system with ChatCLIโ€™s autonomous operations platform. All endpoints follow RESTful conventions and return JSON. The API is served by the Web Dashboard on port 8090 (configurable via CHATCLI_AIOPS_PORT).

Authentication

All authenticated requests must include the X-API-Key header:
Keys are configured via the chatcli-api-keys ConfigMap in the operator namespace:
When no API key is configured (ConfigMap absent), the API operates in dev mode โ€” all requests are allowed without authentication.
Never use dev mode in production. Configure at least one API key before exposing the service.
The API enforces a rate limit of 100 requests per minute per IP.When the limit is exceeded, the API returns:

Response Format

All responses follow the standard envelope: Success (single item):
Success (list with pagination):
Error:

Health

Health check endpoints do not require authentication.

GET /healthz

Checks whether the server is alive.
none
No authentication required.
Response 200 OK:

GET /readyz

Checks whether the server is ready to receive traffic (connected to the cluster, reconcilers active). Response 200 OK:
Response 503 Service Unavailable:

Incidents

Management of incidents detected by the AIOps pipeline.

GET /api/v1/incidents

Lists all incidents with filters and pagination. Minimum role: viewer
string
Filter by severity. Values: critical, high, medium, low.
string
Filter by state. Values: detected, analyzing, remediating, resolved, escalated.
string
Filter by Kubernetes namespace.
integer
default:"1"
Page number.
integer
default:"20"
Items per page. Maximum: 100.
string
Start date/time in ISO 8601 format. E.g.: 2026-03-01T00:00:00Z.
string
End date/time in ISO 8601 format.
Response 200 OK:

GET /api/v1/incidents/:name

Returns complete details for a specific incident. Minimum role: viewer
string
required
Incident name (Issue CR name).
string
default:"default"
Incident namespace.
Response 200 OK:

POST /api/v1/incidents/:name/acknowledge

Marks an incident as acknowledged. Minimum role: operator
string
required
Incident name.
Response 200 OK:

POST /api/v1/incidents/:name/snooze

Suspends notifications for an incident for a specified duration. Minimum role: operator
string
required
Incident name.
string
required
Snooze duration. Go duration format: 30m, 1h, 2h30m, 24h.
Request body:
Response 200 OK:

GET /api/v1/incidents/:name/timeline

Returns the complete timeline of an incident โ€” from detection to resolution. Minimum role: viewer
string
required
Incident name.
Response 200 OK:

GET /api/v1/incidents/:name/remediation

Returns remediation details for an incident, including the plan, executed actions, and results. Minimum role: viewer
string
required
Incident name.
Response 200 OK:

SLOs

Management of Service Level Objectives.

GET /api/v1/slos

Lists all configured SLOs. Minimum role: viewer Response 200 OK:

GET /api/v1/slos/:name

Returns details for a specific SLO. Minimum role: viewer
string
required
SLO name.
Response 200 OK:

GET /api/v1/slos/:name/budget

Returns the detailed error budget for an SLO. Minimum role: viewer
string
required
SLO name.
Response 200 OK:

Runbooks

CRUD for remediation runbooks.

GET /api/v1/runbooks

Lists all available runbooks. Minimum role: viewer Response 200 OK:

GET /api/v1/runbooks/:name

Returns details for a specific runbook. Minimum role: viewer
string
required
Runbook name.
Response 200 OK:

POST /api/v1/runbooks

Creates a new runbook. Minimum role: admin Request body:
Response 201 Created:

PUT /api/v1/runbooks/:name

Updates an existing runbook. Minimum role: admin
string
required
Name of the runbook to update.
Request body: Same format as POST (full RunbookSpec body). Response 200 OK:

DELETE /api/v1/runbooks/:name

Removes a runbook. Minimum role: admin
string
required
Name of the runbook to remove.
Auto-generated runbooks (platform.chatcli.io/auto-generated=true) may be recreated automatically by the AI in future remediations.
Response 200 OK:

Approvals

Management of approvals for actions that require human intervention.

GET /api/v1/approvals

Lists pending or historical approvals. Minimum role: viewer
string
Filter by state. Values: pending, approved, rejected, expired.
Response 200 OK:

GET /api/v1/approvals/:name

Returns details for a specific approval. Minimum role: viewer
string
required
Approval name.
Response 200 OK:

POST /api/v1/approvals/:name/approve

Approves a pending action. Minimum role: operator
string
required
Approval name.
string
required
Identifier of the approver.
string
Reason for approval.
Request body:
Response 200 OK:

POST /api/v1/approvals/:name/reject

Rejects a pending action. Minimum role: operator
string
required
Approval name.
string
required
Identifier of the rejecter.
string
required
Reason for rejection.
Request body:
Response 200 OK:

PostMortems

Querying and management of automatically generated post-mortems.

GET /api/v1/postmortems

Lists all post-mortems. Minimum role: viewer Response 200 OK:

GET /api/v1/postmortems/:name

Returns complete details for a post-mortem. Minimum role: viewer
string
required
Post-mortem name.
Response 200 OK:

POST /api/v1/postmortems/:name/review

Marks a post-mortem as under review. Minimum role: operator
string
required
Post-mortem name.
Response 200 OK:

POST /api/v1/postmortems/:name/close

Closes a post-mortem after review. Minimum role: operator
string
required
Post-mortem name.
Response 200 OK:

Analytics

Aggregated metrics and trends for the AIOps platform.

GET /api/v1/analytics/summary

Returns a general summary of the platform. Minimum role: viewer Response 200 OK:

GET /api/v1/analytics/mttd

Returns the Mean Time to Detect. Minimum role: viewer
string
default:"30d"
Time window. Values: 7d, 14d, 30d, 90d.
Response 200 OK:

GET /api/v1/analytics/mttr

Returns the Mean Time to Resolve. Minimum role: viewer
string
default:"30d"
Time window. Values: 7d, 14d, 30d, 90d.
Response 200 OK:

GET /api/v1/analytics/trends

Returns incident trends over time. Minimum role: viewer Response 200 OK:

GET /api/v1/analytics/top-resources

Returns the resources with the most incidents. Minimum role: viewer Response 200 OK:

GET /api/v1/analytics/remediation-stats

Returns remediation statistics. Minimum role: viewer Response 200 OK:

Clusters

Information about managed Kubernetes clusters.

GET /api/v1/clusters

Lists all monitored clusters. Minimum role: viewer Response 200 OK:

GET /api/v1/clusters/:name

Returns details for a specific cluster. Minimum role: viewer
string
required
Cluster name.
Response 200 OK:

GET /api/v1/clusters/global-status

Returns the global status of all clusters. Minimum role: viewer Response 200 OK:

Audit

Audit log of all actions on the platform.

GET /api/v1/audit

Lists audit events with filters. Minimum role: viewer
string
Event type. Values: incident.created, incident.acknowledged, incident.resolved, incident.escalated, remediation.executed, remediation.failed, approval.approved, approval.rejected, runbook.created, runbook.deleted, api.access.
string
Filter by audit event severity. Values: info, warning, critical.
string
Filter by affected resource name.
string
Start date/time (ISO 8601).
string
End date/time (ISO 8601).
integer
default:"1"
Page number.
integer
default:"50"
Items per page. Maximum: 200.
Response 200 OK:

GET /api/v1/audit/export

Exports the complete audit log in CSV or JSON format. Minimum role: admin
string
default:"json"
Export format. Values: json, csv.
string
Start date/time (ISO 8601).
string
End date/time (ISO 8601).
Response 200 OK (JSON):
Response 200 OK (CSV): The Content-Type header will be text/csv and the body will contain the CSV with columns: id,timestamp,type,severity,actor,resource,namespace,description

Error Codes


SDKs and Integration

curl

All examples on this page use curl. Copy and adapt.

Go Client

Use the operator/pkg/client package for native Go integration.

Webhook

Configure webhook notifications in the Instance CR (spec.notifications).

Grafana

See Web Dashboard and Grafana for pre-configured dashboards.