curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/aiinsights/{name} \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/aiinsights/{name}"
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}/aiinsights/{name}', 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}/aiinsights/{name}",
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}/aiinsights/{name}"
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}/aiinsights/{name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/aiinsights/{name}")
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": "AIInsight",
"spec": {
"name": "payment-service-oom-kill-1773933600-insight",
"namespace": "production",
"issueRef": "payment-service-oom-kill-1773933600",
"provider": "CLAUDEAI",
"model": "claude-sonnet-4-6",
"analysis": "The payment-service deployment is experiencing OOMKill events. Root cause: memory leak in the webhook handler that fails to close HTTP response bodies on validation errors, causing heap accumulation. The leak correlates with a recent deployment (revision 42) that introduced the payment notification webhook handler.",
"confidence": 0.91,
"recommendations": [
"Increase memory limit from 512Mi to 1Gi as immediate mitigation",
"Restart pods to reclaim leaked memory",
"Review webhook handler code for unclosed response bodies"
],
"suggestedActions": [
{
"name": "Increase memory limit",
"action": "AdjustResources",
"description": "Increase memory limit to prevent further OOMKills while the code fix is deployed",
"params": {
"memory_limit": "1Gi"
}
},
{
"name": "Restart deployment",
"action": "RestartDeployment",
"description": "Restart pods to reclaim leaked memory immediately"
}
],
"logAnalysis": "1 Go panic stack trace detected; 12 critical error patterns (OOMKilled, memory allocation failure); Primary exception: runtime: out of memory",
"gitOpsContext": "Helm release 'payment' chart=payment-service version=2.3.1 status=deployed revision=42",
"cascadeAnalysis": "Cascade chain: production/payment-service(root_cause) -> production/api-gateway(victim). The api-gateway is receiving 503 responses from payment-service.",
"blastRadiusPrediction": "AdjustResources: Low risk. Affects 3 pods, 1 service (payment-svc). No PDB violations.",
"generatedAt": "2026-03-19T15:21:00Z",
"creationTimestamp": "2026-03-19T15:20:05Z"
},
"status": {
"analysis": "The payment-service deployment is experiencing OOMKill events. Root cause: memory leak in the webhook handler that fails to close HTTP response bodies on validation errors, causing heap accumulation. The leak correlates with a recent deployment (revision 42) that introduced the payment notification webhook handler.",
"confidence": 0.91,
"recommendations": [
"Increase memory limit from 512Mi to 1Gi as immediate mitigation",
"Restart pods to reclaim leaked memory",
"Review webhook handler code for unclosed response bodies"
],
"suggestedActions": [
{
"name": "Increase memory limit",
"action": "AdjustResources",
"description": "Increase memory limit to prevent further OOMKills while the code fix is deployed",
"params": {
"memory_limit": "1Gi"
}
},
{
"name": "Restart deployment",
"action": "RestartDeployment",
"description": "Restart pods to reclaim leaked memory immediately"
}
],
"generatedAt": "2026-03-19T15:21:00Z",
"logAnalysis": "1 Go panic stack trace detected; 12 critical error patterns (OOMKilled, memory allocation failure); Primary exception: runtime: out of memory",
"gitOpsContext": "Helm release 'payment' chart=payment-service version=2.3.1 status=deployed revision=42",
"cascadeAnalysis": "Cascade chain: production/payment-service(root_cause) -> production/api-gateway(victim). The api-gateway is receiving 503 responses from payment-service.",
"blastRadiusPrediction": "AdjustResources: Low risk. Affects 3 pods, 1 service (payment-svc). No PDB violations."
},
"resourceMeta": {
"name": "payment-service-oom-kill-1773933600-insight",
"namespace": "production",
"uid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"creationTimestamp": "2026-03-19T15:20:05Z"
}
}
Get AI Insight
Returns the complete AI analysis for a specific insight, including all enrichment contexts and suggested actions
curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/aiinsights/{name} \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/aiinsights/{name}"
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}/aiinsights/{name}', 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}/aiinsights/{name}",
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}/aiinsights/{name}"
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}/aiinsights/{name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/aiinsights/{name}")
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": "AIInsight",
"spec": {
"name": "payment-service-oom-kill-1773933600-insight",
"namespace": "production",
"issueRef": "payment-service-oom-kill-1773933600",
"provider": "CLAUDEAI",
"model": "claude-sonnet-4-6",
"analysis": "The payment-service deployment is experiencing OOMKill events. Root cause: memory leak in the webhook handler that fails to close HTTP response bodies on validation errors, causing heap accumulation. The leak correlates with a recent deployment (revision 42) that introduced the payment notification webhook handler.",
"confidence": 0.91,
"recommendations": [
"Increase memory limit from 512Mi to 1Gi as immediate mitigation",
"Restart pods to reclaim leaked memory",
"Review webhook handler code for unclosed response bodies"
],
"suggestedActions": [
{
"name": "Increase memory limit",
"action": "AdjustResources",
"description": "Increase memory limit to prevent further OOMKills while the code fix is deployed",
"params": {
"memory_limit": "1Gi"
}
},
{
"name": "Restart deployment",
"action": "RestartDeployment",
"description": "Restart pods to reclaim leaked memory immediately"
}
],
"logAnalysis": "1 Go panic stack trace detected; 12 critical error patterns (OOMKilled, memory allocation failure); Primary exception: runtime: out of memory",
"gitOpsContext": "Helm release 'payment' chart=payment-service version=2.3.1 status=deployed revision=42",
"cascadeAnalysis": "Cascade chain: production/payment-service(root_cause) -> production/api-gateway(victim). The api-gateway is receiving 503 responses from payment-service.",
"blastRadiusPrediction": "AdjustResources: Low risk. Affects 3 pods, 1 service (payment-svc). No PDB violations.",
"generatedAt": "2026-03-19T15:21:00Z",
"creationTimestamp": "2026-03-19T15:20:05Z"
},
"status": {
"analysis": "The payment-service deployment is experiencing OOMKill events. Root cause: memory leak in the webhook handler that fails to close HTTP response bodies on validation errors, causing heap accumulation. The leak correlates with a recent deployment (revision 42) that introduced the payment notification webhook handler.",
"confidence": 0.91,
"recommendations": [
"Increase memory limit from 512Mi to 1Gi as immediate mitigation",
"Restart pods to reclaim leaked memory",
"Review webhook handler code for unclosed response bodies"
],
"suggestedActions": [
{
"name": "Increase memory limit",
"action": "AdjustResources",
"description": "Increase memory limit to prevent further OOMKills while the code fix is deployed",
"params": {
"memory_limit": "1Gi"
}
},
{
"name": "Restart deployment",
"action": "RestartDeployment",
"description": "Restart pods to reclaim leaked memory immediately"
}
],
"generatedAt": "2026-03-19T15:21:00Z",
"logAnalysis": "1 Go panic stack trace detected; 12 critical error patterns (OOMKilled, memory allocation failure); Primary exception: runtime: out of memory",
"gitOpsContext": "Helm release 'payment' chart=payment-service version=2.3.1 status=deployed revision=42",
"cascadeAnalysis": "Cascade chain: production/payment-service(root_cause) -> production/api-gateway(victim). The api-gateway is receiving 503 responses from payment-service.",
"blastRadiusPrediction": "AdjustResources: Low risk. Affects 3 pods, 1 service (payment-svc). No PDB violations."
},
"resourceMeta": {
"name": "payment-service-oom-kill-1773933600-insight",
"namespace": "production",
"uid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"creationTimestamp": "2026-03-19T15:20:05Z"
}
}
<issue>-insight (e.g., payment-service-oom-kill-1773933600-insight)default (it does not search other namespaces), so pass the insight’s namespace explicitly.Response Fields
spec carries the full insight item (the fields of List AI Insights, including issueRef, provider and model); status is the resource’s raw Kubernetes status, with the analysis fields below.
| Field | Description |
|---|---|
analysis | AI-generated root cause analysis text |
confidence | Confidence score from 0.0 to 1.0 |
recommendations | Human-readable suggestions |
suggestedActions | Concrete actions with type and parameters |
logAnalysis | Structured findings from pod log analysis |
metricsContext | Prometheus metric data correlated with the incident |
sourceCodeContext | Relevant source code snippets from the app repository |
gitOpsContext | Helm/ArgoCD/Flux status at time of analysis |
cascadeAnalysis | Cross-service cascade failure analysis |
blastRadiusPrediction | Predicted impact of suggested remediation actions |
{
"apiVersion": "v1",
"kind": "AIInsight",
"spec": {
"name": "payment-service-oom-kill-1773933600-insight",
"namespace": "production",
"issueRef": "payment-service-oom-kill-1773933600",
"provider": "CLAUDEAI",
"model": "claude-sonnet-4-6",
"analysis": "The payment-service deployment is experiencing OOMKill events. Root cause: memory leak in the webhook handler that fails to close HTTP response bodies on validation errors, causing heap accumulation. The leak correlates with a recent deployment (revision 42) that introduced the payment notification webhook handler.",
"confidence": 0.91,
"recommendations": [
"Increase memory limit from 512Mi to 1Gi as immediate mitigation",
"Restart pods to reclaim leaked memory",
"Review webhook handler code for unclosed response bodies"
],
"suggestedActions": [
{
"name": "Increase memory limit",
"action": "AdjustResources",
"description": "Increase memory limit to prevent further OOMKills while the code fix is deployed",
"params": {
"memory_limit": "1Gi"
}
},
{
"name": "Restart deployment",
"action": "RestartDeployment",
"description": "Restart pods to reclaim leaked memory immediately"
}
],
"logAnalysis": "1 Go panic stack trace detected; 12 critical error patterns (OOMKilled, memory allocation failure); Primary exception: runtime: out of memory",
"gitOpsContext": "Helm release 'payment' chart=payment-service version=2.3.1 status=deployed revision=42",
"cascadeAnalysis": "Cascade chain: production/payment-service(root_cause) -> production/api-gateway(victim). The api-gateway is receiving 503 responses from payment-service.",
"blastRadiusPrediction": "AdjustResources: Low risk. Affects 3 pods, 1 service (payment-svc). No PDB violations.",
"generatedAt": "2026-03-19T15:21:00Z",
"creationTimestamp": "2026-03-19T15:20:05Z"
},
"status": {
"analysis": "The payment-service deployment is experiencing OOMKill events. Root cause: memory leak in the webhook handler that fails to close HTTP response bodies on validation errors, causing heap accumulation. The leak correlates with a recent deployment (revision 42) that introduced the payment notification webhook handler.",
"confidence": 0.91,
"recommendations": [
"Increase memory limit from 512Mi to 1Gi as immediate mitigation",
"Restart pods to reclaim leaked memory",
"Review webhook handler code for unclosed response bodies"
],
"suggestedActions": [
{
"name": "Increase memory limit",
"action": "AdjustResources",
"description": "Increase memory limit to prevent further OOMKills while the code fix is deployed",
"params": {
"memory_limit": "1Gi"
}
},
{
"name": "Restart deployment",
"action": "RestartDeployment",
"description": "Restart pods to reclaim leaked memory immediately"
}
],
"generatedAt": "2026-03-19T15:21:00Z",
"logAnalysis": "1 Go panic stack trace detected; 12 critical error patterns (OOMKilled, memory allocation failure); Primary exception: runtime: out of memory",
"gitOpsContext": "Helm release 'payment' chart=payment-service version=2.3.1 status=deployed revision=42",
"cascadeAnalysis": "Cascade chain: production/payment-service(root_cause) -> production/api-gateway(victim). The api-gateway is receiving 503 responses from payment-service.",
"blastRadiusPrediction": "AdjustResources: Low risk. Affects 3 pods, 1 service (payment-svc). No PDB violations."
},
"resourceMeta": {
"name": "payment-service-oom-kill-1773933600-insight",
"namespace": "production",
"uid": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"creationTimestamp": "2026-03-19T15:20:05Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "AI insight not found: aiinsights.platform.chatcli.io \"payment-service-oom-kill-1773933600-insight\" not found"
}
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).
Path Parameters
AIInsight name.
"payment-oom-insight"
Query Parameters
Namespace of the object. Defaults to default — pass it for objects in any other namespace.