Resolve Incident
curl --request POST \
--url http://{host}:{port}/{basePath}/incidents/{name}/resolve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"resolution": "Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes."
}
'import requests
url = "http://{host}:{port}/{basePath}/incidents/{name}/resolve"
payload = { "resolution": "Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes." }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
resolution: 'Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.'
})
};
fetch('http://{host}:{port}/{basePath}/incidents/{name}/resolve', 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 => "http://{host}:{port}/{basePath}/incidents/{name}/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resolution' => 'Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{basePath}/incidents/{name}/resolve"
payload := strings.NewReader("{\n \"resolution\": \"Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{basePath}/incidents/{name}/resolve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"resolution\": \"Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{basePath}/incidents/{name}/resolve")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resolution\": \"Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.\"\n}"
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "Incident",
"metadata": {
"name": "INC-20260319-001",
"namespace": "production",
"annotations": {
"aiops.chatcli.io/resolved-by": "operator",
"aiops.chatcli.io/resolved-at": "2026-03-19T16:45:00Z",
"aiops.chatcli.io/manual-resolution": "true"
}
},
"spec": {
"resourceRef": {
"kind": "Deployment",
"name": "payment-service",
"namespace": "production"
},
"severity": "critical",
"signalType": "oom_kill"
},
"status": {
"state": "Resolved",
"resolution": "Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.",
"resolvedAt": "2026-03-19T16:45:00Z",
"detectedAt": "2026-03-19T14:30:00Z",
"remediationAttempts": 3,
"escalatedAt": "2026-03-19T15:15:00Z"
}
}
Incidents
Resolver Incidente
Resolve manualmente um incidente — essencial quando o sistema escala para ação humana ou quando um operador confirma que o problema foi corrigido
POST
/
incidents
/
{name}
/
resolve
Resolve Incident
curl --request POST \
--url http://{host}:{port}/{basePath}/incidents/{name}/resolve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"resolution": "Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes."
}
'import requests
url = "http://{host}:{port}/{basePath}/incidents/{name}/resolve"
payload = { "resolution": "Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes." }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
resolution: 'Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.'
})
};
fetch('http://{host}:{port}/{basePath}/incidents/{name}/resolve', 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 => "http://{host}:{port}/{basePath}/incidents/{name}/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resolution' => 'Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{basePath}/incidents/{name}/resolve"
payload := strings.NewReader("{\n \"resolution\": \"Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{basePath}/incidents/{name}/resolve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"resolution\": \"Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{basePath}/incidents/{name}/resolve")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resolution\": \"Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.\"\n}"
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "Incident",
"metadata": {
"name": "INC-20260319-001",
"namespace": "production",
"annotations": {
"aiops.chatcli.io/resolved-by": "operator",
"aiops.chatcli.io/resolved-at": "2026-03-19T16:45:00Z",
"aiops.chatcli.io/manual-resolution": "true"
}
},
"spec": {
"resourceRef": {
"kind": "Deployment",
"name": "payment-service",
"namespace": "production"
},
"severity": "critical",
"signalType": "oom_kill"
},
"status": {
"state": "Resolved",
"resolution": "Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.",
"resolvedAt": "2026-03-19T16:45:00Z",
"detectedAt": "2026-03-19T14:30:00Z",
"remediationAttempts": 3,
"escalatedAt": "2026-03-19T15:15:00Z"
}
}
string
obrigatório
Nome único do incidente (ex.:
INC-20260319-001)string
padrão:"default"
Namespace Kubernetes do incidente
string
Descrição de como o incidente foi resolvido. Se omitido, assume o valor padrão
"Manually resolved via dashboard".Boa prática: sempre forneça uma mensagem de resolução significativa para postmortem e trilha de auditoria.Quando Usar Este Endpoint
Este endpoint é crítico nos seguintes cenários:1. Incidentes Escalados (Ação Humana Necessária)
Quando a plataforma AIOps esgota todas as tentativas de remediação automática (padrão: 3 tentativas), o incidente transiciona para o estado Escalated. Neste ponto:- O sistema de notificação alerta a equipe de plantão pelos canais configurados (Slack, PagerDuty, etc.)
- A política de escalação progride através dos níveis (L1 → L2 → L3) com base nos tempos limite
- Nenhuma remediação automática adicional será tentada
- O incidente permanece no estado
Escalatedaté que um humano o resolva por este endpoint, pelo painel web ou pela CLI
2. Verificação Manual Após Remediação Automatica
Mesmo quando a remediação automática e bem-sucedida, operadores podem querer verificar manualmente e fechar o incidente com contexto adicional.3. Falsos Positivos
Quando um incidente e detectado mas o operador determina que e um falso positivo, use este endpoint com uma resolução como"False positive — metric spike caused by scheduled batch job".
Fluxo de Resolução para Incidentes Escalados
Incidente Detectado
↓
Análise IA → Remediação Runbook/Agentica
↓ ↓
Sucesso → Resolvido Falha (retry até 3x)
↓
Todas tentativas esgotadas
↓
ESCALADO ← Você está aqui
↓
┌─────────────────┼──────────────────┐
↓ ↓ ↓
API Resolver Botao Dashboard Comando CLI
POST /resolve Botao "Resolver" (versão futura)
↓ ↓ ↓
└─────────────────┼──────────────────┘
↓
Estado: Resolvido
PostMortem gerado
Cache de dedup limpo
Evento de auditoria registrado
O Que Acontece Após a Resolução
- Mudança de Estado: O incidente transiciona de
Escalated(ou qualquer estado ativo) paraResolved - Anotações Adicionadas:
aiops.chatcli.io/resolved-by— o papel/usuário autenticadoaiops.chatcli.io/resolved-at— timestamp da resoluçãoaiops.chatcli.io/manual-resolution— definido como"true"
- Cache de Dedup Limpo: A entrada de deduplicação do recurso é invalidada, permitindo que novas anomalias sejam detectadas para o mesmo recurso
- PostMortem Gerado: Um postmortem automático é criado com os detalhes da resolução
- Evento de Auditoria: Um evento de auditoria imutável é registrado para conformidade
{
"apiVersion": "v1",
"kind": "Incident",
"metadata": {
"name": "INC-20260319-001",
"namespace": "production",
"annotations": {
"aiops.chatcli.io/resolved-by": "operator",
"aiops.chatcli.io/resolved-at": "2026-03-19T16:45:00Z",
"aiops.chatcli.io/manual-resolution": "true"
}
},
"spec": {
"resourceRef": {
"kind": "Deployment",
"name": "payment-service",
"namespace": "production"
},
"severity": "critical",
"signalType": "oom_kill"
},
"status": {
"state": "Resolved",
"resolution": "Memory leak fixed in payment-service v2.4.1 hotfix deployed manually. Verified stable for 15 minutes.",
"resolvedAt": "2026-03-19T16:45:00Z",
"detectedAt": "2026-03-19T14:30:00Z",
"remediationAttempts": 3,
"escalatedAt": "2026-03-19T15:15:00Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": {
"code": 404,
"message": "Incident not found",
"details": "No incident named 'INC-20260319-999' found in namespace 'production'"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": {
"code": 409,
"message": "Incident already resolved",
"details": "The incident 'INC-20260319-001' was already resolved at 2026-03-19T16:45:00Z"
}
}
Autorizações
Bearer token issued by the operator. Format: Authorization: Bearer <token>.
Parâmetros de caminho
Unique incident name.
Exemplo:
"INC-20260319-001"
Parâmetros de consulta
Kubernetes namespace of the incident.
Corpo
application/json
Description of how the incident was resolved. Defaults to "Manually resolved via dashboard" when omitted.
⌘I