curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/analytics/compliance \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/analytics/compliance"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('{scheme}://{host}:{port}/{basePath}/analytics/compliance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/analytics/compliance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/{basePath}/analytics/compliance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/analytics/compliance")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/analytics/compliance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "ComplianceReport",
"spec": {
"Period": {
"Start": "2026-03-15T15:00:00Z",
"End": "2026-03-22T15:00:00Z"
},
"IncidentMetrics": {
"TotalIncidents": 45,
"BySeverity": {
"critical": 5,
"high": 12,
"medium": 18,
"low": 10
},
"ByState": {
"Resolved": 38,
"Escalated": 4,
"Analyzing": 3
},
"MTTD": 32000000000,
"MTTR": 510000000000,
"MeanRemediationAttempts": 1.8
},
"RemediationMetrics": {
"TotalRemediations": 52,
"SuccessRate": 88.4,
"ByActionType": {
"AdjustResources": {
"Count": 14,
"Success": 13,
"Failed": 1
},
"RestartDeployment": {
"Count": 9,
"Success": 7,
"Failed": 2
}
},
"AutoRemediatedCount": 38,
"AgenticCount": 27
},
"SLAMetrics": {
"CompliancePercentage": 91.1,
"ResponseSLAViolations": 0,
"ResolutionSLAViolations": 4,
"AverageResponseTime": 32000000000,
"AverageResolutionTime": 540000000000
},
"ApprovalMetrics": {
"TotalRequests": 14,
"AutoApproved": 8,
"ManualApproved": 4,
"Rejected": 1,
"Expired": 1,
"AverageDecisionTime": 190000000000
},
"AuditSummary": {
"TotalEvents": 310,
"BySeverity": {
"info": 280,
"warning": 27,
"critical": 3
},
"ByEventType": {
"issue_created": 45,
"remediation_completed": 38,
"approval_granted": 12
}
}
}
}
Analytics Compliance
Returns a compliance report with incident, remediation, SLA, approval and audit metrics for a time window
curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/analytics/compliance \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/analytics/compliance"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('{scheme}://{host}:{port}/{basePath}/analytics/compliance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/{basePath}/analytics/compliance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/{basePath}/analytics/compliance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/{basePath}/analytics/compliance")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/analytics/compliance")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "ComplianceReport",
"spec": {
"Period": {
"Start": "2026-03-15T15:00:00Z",
"End": "2026-03-22T15:00:00Z"
},
"IncidentMetrics": {
"TotalIncidents": 45,
"BySeverity": {
"critical": 5,
"high": 12,
"medium": 18,
"low": 10
},
"ByState": {
"Resolved": 38,
"Escalated": 4,
"Analyzing": 3
},
"MTTD": 32000000000,
"MTTR": 510000000000,
"MeanRemediationAttempts": 1.8
},
"RemediationMetrics": {
"TotalRemediations": 52,
"SuccessRate": 88.4,
"ByActionType": {
"AdjustResources": {
"Count": 14,
"Success": 13,
"Failed": 1
},
"RestartDeployment": {
"Count": 9,
"Success": 7,
"Failed": 2
}
},
"AutoRemediatedCount": 38,
"AgenticCount": 27
},
"SLAMetrics": {
"CompliancePercentage": 91.1,
"ResponseSLAViolations": 0,
"ResolutionSLAViolations": 4,
"AverageResponseTime": 32000000000,
"AverageResolutionTime": 540000000000
},
"ApprovalMetrics": {
"TotalRequests": 14,
"AutoApproved": 8,
"ManualApproved": 4,
"Rejected": 1,
"Expired": 1,
"AverageDecisionTime": 190000000000
},
"AuditSummary": {
"TotalEvents": 310,
"BySeverity": {
"info": 280,
"warning": 27,
"critical": 3
},
"ByEventType": {
"issue_created": 45,
"remediation_completed": 38,
"approval_granted": 12
}
}
}
}
from and to are an absolute period: with both, the report covers exactly [from, to]; with only from, it runs to now; with only to, it is the 7 days ending at to; with neither, the last 7 days.Report Contents
Minimum role:viewer. Resources created inside the window are aggregated:
- IncidentMetrics: total Issues, by severity and state,
MTTD(detectedAt − creationTimestamp),MTTR(resolvedAt − detectedAt), mean remediation attempts - RemediationMetrics: total plans,
SuccessRate(percent, 0 to 100, over plans that endedCompletedvsFailed/RolledBack), per action type,AutoRemediatedCount(plansCompleted),AgenticCount(agentic plans) - SLAMetrics:
ResponseSLAViolationsandResolutionSLAViolations,CompliancePercentage(share of Issues with no violation; 100 when there are none), average response and resolution times. With IncidentSLAs in scope, a violation is what the IncidentSLA controller recorded on the Issue (platform.chatcli.io/sla-violated,responseand/orresolution). Without any IncidentSLA, an Issue in stateEscalatedcounts as a resolution violation and response violations stay0. - IncidentSLAs: one entry per IncidentSLA in scope (
Name,Namespace,Severity,ResponseTime,ResolutionTime,CompliancePercentage,ActiveViolations,TotalViolations,TotalIssuesTracked); omitted when there is none - ApprovalMetrics: requests, auto/manual approved, rejected, expired, average decision time
- AuditSummary: total AuditEvents, by severity and by event type
MTTD, MTTR, Average*Time) is an integer number of nanoseconds. MTTR here is measured from detection, while /analytics/mttr measures from Issue creation.{
"apiVersion": "v1",
"kind": "ComplianceReport",
"spec": {
"Period": {
"Start": "2026-03-15T15:00:00Z",
"End": "2026-03-22T15:00:00Z"
},
"IncidentMetrics": {
"TotalIncidents": 45,
"BySeverity": {
"critical": 5,
"high": 12,
"medium": 18,
"low": 10
},
"ByState": {
"Resolved": 38,
"Escalated": 4,
"Analyzing": 3
},
"MTTD": 32000000000,
"MTTR": 510000000000,
"MeanRemediationAttempts": 1.8
},
"RemediationMetrics": {
"TotalRemediations": 52,
"SuccessRate": 88.4,
"ByActionType": {
"AdjustResources": {
"Count": 14,
"Success": 13,
"Failed": 1
},
"RestartDeployment": {
"Count": 9,
"Success": 7,
"Failed": 2
}
},
"AutoRemediatedCount": 38,
"AgenticCount": 27
},
"SLAMetrics": {
"CompliancePercentage": 91.1,
"ResponseSLAViolations": 0,
"ResolutionSLAViolations": 4,
"AverageResponseTime": 32000000000,
"AverageResolutionTime": 540000000000
},
"ApprovalMetrics": {
"TotalRequests": 14,
"AutoApproved": 8,
"ManualApproved": 4,
"Rejected": 1,
"Expired": 1,
"AverageDecisionTime": 190000000000
},
"AuditSummary": {
"TotalEvents": 310,
"BySeverity": {
"info": 280,
"warning": 27,
"critical": 3
},
"ByEventType": {
"issue_created": 45,
"remediation_completed": 38,
"approval_granted": 12
}
}
}
}
Authorizations
API key sent in the X-API-Key header. Keys are read from the Secret chatcli-operator-secrets, key api-keys (fallback: ConfigMap chatcli-operator-config, key api-keys) in the operator namespace, as a YAML list of {key, role, name, description} (name is the identity recorded on approval decisions); the operator chart creates it only with apiKeys.create: true. Roles: viewer < operator < admin — any other role string is denied everywhere. Changes are picked up within about 30 seconds; deleting both the Secret and the ConfigMap revokes every key. With no keys configured every /api/ call returns 401, unless CHATCLI_OPERATOR_DEV_MODE=true, which grants admin without a key (development only).
Query Parameters
Kubernetes namespace. Empty means all namespaces.
Start of the time range (RFC3339). Unparseable values are ignored.
"2026-03-01T00:00:00Z"
End of the time range (RFC3339). Unparseable values are ignored.
"2026-03-19T23:59:59Z"