curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/postmortems/{name} \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/postmortems/{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}/postmortems/{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}/postmortems/{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}/postmortems/{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}/postmortems/{name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/postmortems/{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": "PostMortem",
"spec": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"issueRef": "checkout-service-oom-kill-1773871200",
"resource": {
"kind": "Deployment",
"name": "checkout-service",
"namespace": "production"
},
"severity": "critical",
"state": "Open",
"summary": "Pods do checkout-service sofreram OOMKill repetidamente; o limite de memória foi aumentado e os pods estabilizaram.",
"rootCause": "Limite de memória de 512Mi abaixo do working set do handler de webhook de pagamento",
"impact": "Requests de checkout falharam enquanto os pods reiniciavam",
"duration": "45m0s",
"lessonsLearned": [
"Revisar limites de memória com base no working set observado"
],
"preventionActions": [
"Adicionar alerta de uso de heap ao checkout-service"
],
"timeline": [
{
"timestamp": "2026-03-18T22:00:00Z",
"type": "detected",
"detail": "Containers com OOMKill no Deployment checkout-service"
},
{
"timestamp": "2026-03-18T22:10:00Z",
"type": "action_executed",
"detail": "AdjustResources: memory limit 512Mi -> 1Gi"
},
{
"timestamp": "2026-03-18T22:45:00Z",
"type": "resolved",
"detail": "Pods estáveis após o ajuste de recursos"
}
],
"actionsExecuted": [
{
"action": "AdjustResources",
"params": {
"memory_limit": "1Gi"
},
"result": "success",
"detail": "limite de memória atualizado",
"timestamp": "2026-03-18T22:10:00Z"
}
],
"feedback": {
"remediationAccuracy": 4,
"comments": "Diagnóstico correto; mudar o limite foi o primeiro passo certo.",
"providedBy": "sre-oncall",
"providedAt": "2026-03-19T09:00:00Z"
},
"generatedAt": "2026-03-18T22:45:00Z",
"creationTimestamp": "2026-03-18T22:45:00Z"
},
"status": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"issueRef": "checkout-service-oom-kill-1773871200",
"resource": {
"kind": "Deployment",
"name": "checkout-service",
"namespace": "production"
},
"severity": "critical",
"state": "Open",
"summary": "Pods do checkout-service sofreram OOMKill repetidamente; o limite de memória foi aumentado e os pods estabilizaram.",
"rootCause": "Limite de memória de 512Mi abaixo do working set do handler de webhook de pagamento",
"impact": "Requests de checkout falharam enquanto os pods reiniciavam",
"duration": "45m0s",
"lessonsLearned": [
"Revisar limites de memória com base no working set observado"
],
"preventionActions": [
"Adicionar alerta de uso de heap ao checkout-service"
],
"timeline": [
{
"timestamp": "2026-03-18T22:00:00Z",
"type": "detected",
"detail": "Containers com OOMKill no Deployment checkout-service"
},
{
"timestamp": "2026-03-18T22:10:00Z",
"type": "action_executed",
"detail": "AdjustResources: memory limit 512Mi -> 1Gi"
},
{
"timestamp": "2026-03-18T22:45:00Z",
"type": "resolved",
"detail": "Pods estáveis após o ajuste de recursos"
}
],
"actionsExecuted": [
{
"action": "AdjustResources",
"params": {
"memory_limit": "1Gi"
},
"result": "success",
"detail": "limite de memória atualizado",
"timestamp": "2026-03-18T22:10:00Z"
}
],
"feedback": {
"remediationAccuracy": 4,
"comments": "Diagnóstico correto; mudar o limite foi o primeiro passo certo.",
"providedBy": "sre-oncall",
"providedAt": "2026-03-19T09:00:00Z"
},
"generatedAt": "2026-03-18T22:45:00Z",
"creationTimestamp": "2026-03-18T22:45:00Z"
},
"resourceMeta": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"uid": "3d9b8e61-2f4a-4b7c-8e15-6a0c9f2d7b43",
"creationTimestamp": "2026-03-18T22:45:00Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "postmortem not found: postmortems.platform.chatcli.io \"pm-checkout-service-oom-kill-1773871200\" not found"
}
Obter PostMortem
Retorna o postmortem de um incidente: resumo, causa raiz, timeline, ações executadas e feedback
curl --request GET \
--url {scheme}://{host}:{port}/{basePath}/postmortems/{name} \
--header 'X-API-Key: <api-key>'import requests
url = "{scheme}://{host}:{port}/{basePath}/postmortems/{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}/postmortems/{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}/postmortems/{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}/postmortems/{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}/postmortems/{name}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/postmortems/{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": "PostMortem",
"spec": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"issueRef": "checkout-service-oom-kill-1773871200",
"resource": {
"kind": "Deployment",
"name": "checkout-service",
"namespace": "production"
},
"severity": "critical",
"state": "Open",
"summary": "Pods do checkout-service sofreram OOMKill repetidamente; o limite de memória foi aumentado e os pods estabilizaram.",
"rootCause": "Limite de memória de 512Mi abaixo do working set do handler de webhook de pagamento",
"impact": "Requests de checkout falharam enquanto os pods reiniciavam",
"duration": "45m0s",
"lessonsLearned": [
"Revisar limites de memória com base no working set observado"
],
"preventionActions": [
"Adicionar alerta de uso de heap ao checkout-service"
],
"timeline": [
{
"timestamp": "2026-03-18T22:00:00Z",
"type": "detected",
"detail": "Containers com OOMKill no Deployment checkout-service"
},
{
"timestamp": "2026-03-18T22:10:00Z",
"type": "action_executed",
"detail": "AdjustResources: memory limit 512Mi -> 1Gi"
},
{
"timestamp": "2026-03-18T22:45:00Z",
"type": "resolved",
"detail": "Pods estáveis após o ajuste de recursos"
}
],
"actionsExecuted": [
{
"action": "AdjustResources",
"params": {
"memory_limit": "1Gi"
},
"result": "success",
"detail": "limite de memória atualizado",
"timestamp": "2026-03-18T22:10:00Z"
}
],
"feedback": {
"remediationAccuracy": 4,
"comments": "Diagnóstico correto; mudar o limite foi o primeiro passo certo.",
"providedBy": "sre-oncall",
"providedAt": "2026-03-19T09:00:00Z"
},
"generatedAt": "2026-03-18T22:45:00Z",
"creationTimestamp": "2026-03-18T22:45:00Z"
},
"status": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"issueRef": "checkout-service-oom-kill-1773871200",
"resource": {
"kind": "Deployment",
"name": "checkout-service",
"namespace": "production"
},
"severity": "critical",
"state": "Open",
"summary": "Pods do checkout-service sofreram OOMKill repetidamente; o limite de memória foi aumentado e os pods estabilizaram.",
"rootCause": "Limite de memória de 512Mi abaixo do working set do handler de webhook de pagamento",
"impact": "Requests de checkout falharam enquanto os pods reiniciavam",
"duration": "45m0s",
"lessonsLearned": [
"Revisar limites de memória com base no working set observado"
],
"preventionActions": [
"Adicionar alerta de uso de heap ao checkout-service"
],
"timeline": [
{
"timestamp": "2026-03-18T22:00:00Z",
"type": "detected",
"detail": "Containers com OOMKill no Deployment checkout-service"
},
{
"timestamp": "2026-03-18T22:10:00Z",
"type": "action_executed",
"detail": "AdjustResources: memory limit 512Mi -> 1Gi"
},
{
"timestamp": "2026-03-18T22:45:00Z",
"type": "resolved",
"detail": "Pods estáveis após o ajuste de recursos"
}
],
"actionsExecuted": [
{
"action": "AdjustResources",
"params": {
"memory_limit": "1Gi"
},
"result": "success",
"detail": "limite de memória atualizado",
"timestamp": "2026-03-18T22:10:00Z"
}
],
"feedback": {
"remediationAccuracy": 4,
"comments": "Diagnóstico correto; mudar o limite foi o primeiro passo certo.",
"providedBy": "sre-oncall",
"providedAt": "2026-03-19T09:00:00Z"
},
"generatedAt": "2026-03-18T22:45:00Z",
"creationTimestamp": "2026-03-18T22:45:00Z"
},
"resourceMeta": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"uid": "3d9b8e61-2f4a-4b7c-8e15-6a0c9f2d7b43",
"creationTimestamp": "2026-03-18T22:45:00Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "postmortem not found: postmortems.platform.chatcli.io \"pm-checkout-service-oom-kill-1773871200\" not found"
}
pm-<nome do issue>, ex.: pm-checkout-service-oom-kill-1773871200)namespace, procura apenas em default.viewer. spec e status trazem o mesmo objeto achatado. Além dos campos mostrados, um item pode trazer reviewedAt, requiresHumanAction e requiredAction (preenchidos quando o incidente foi contido e uma pessoa precisa restaurar o workload) e chaosInduced/chaosExperiment (quando o Issue foi correlacionado a um ChaosExperiment). Campos vazios são omitidos.
A projeção REST não inclui todos os campos de status do PostMortem. Snapshots de métricas, blast radius, correlação com git, impacto no SLI, trending, contexto GitOps, resumo da análise de logs e cadeia de cascata ficam apenas no recurso: kubectl get postmortem <nome> -n <namespace> -o yaml.
{
"apiVersion": "v1",
"kind": "PostMortem",
"spec": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"issueRef": "checkout-service-oom-kill-1773871200",
"resource": {
"kind": "Deployment",
"name": "checkout-service",
"namespace": "production"
},
"severity": "critical",
"state": "Open",
"summary": "Pods do checkout-service sofreram OOMKill repetidamente; o limite de memória foi aumentado e os pods estabilizaram.",
"rootCause": "Limite de memória de 512Mi abaixo do working set do handler de webhook de pagamento",
"impact": "Requests de checkout falharam enquanto os pods reiniciavam",
"duration": "45m0s",
"lessonsLearned": [
"Revisar limites de memória com base no working set observado"
],
"preventionActions": [
"Adicionar alerta de uso de heap ao checkout-service"
],
"timeline": [
{
"timestamp": "2026-03-18T22:00:00Z",
"type": "detected",
"detail": "Containers com OOMKill no Deployment checkout-service"
},
{
"timestamp": "2026-03-18T22:10:00Z",
"type": "action_executed",
"detail": "AdjustResources: memory limit 512Mi -> 1Gi"
},
{
"timestamp": "2026-03-18T22:45:00Z",
"type": "resolved",
"detail": "Pods estáveis após o ajuste de recursos"
}
],
"actionsExecuted": [
{
"action": "AdjustResources",
"params": {
"memory_limit": "1Gi"
},
"result": "success",
"detail": "limite de memória atualizado",
"timestamp": "2026-03-18T22:10:00Z"
}
],
"feedback": {
"remediationAccuracy": 4,
"comments": "Diagnóstico correto; mudar o limite foi o primeiro passo certo.",
"providedBy": "sre-oncall",
"providedAt": "2026-03-19T09:00:00Z"
},
"generatedAt": "2026-03-18T22:45:00Z",
"creationTimestamp": "2026-03-18T22:45:00Z"
},
"status": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"issueRef": "checkout-service-oom-kill-1773871200",
"resource": {
"kind": "Deployment",
"name": "checkout-service",
"namespace": "production"
},
"severity": "critical",
"state": "Open",
"summary": "Pods do checkout-service sofreram OOMKill repetidamente; o limite de memória foi aumentado e os pods estabilizaram.",
"rootCause": "Limite de memória de 512Mi abaixo do working set do handler de webhook de pagamento",
"impact": "Requests de checkout falharam enquanto os pods reiniciavam",
"duration": "45m0s",
"lessonsLearned": [
"Revisar limites de memória com base no working set observado"
],
"preventionActions": [
"Adicionar alerta de uso de heap ao checkout-service"
],
"timeline": [
{
"timestamp": "2026-03-18T22:00:00Z",
"type": "detected",
"detail": "Containers com OOMKill no Deployment checkout-service"
},
{
"timestamp": "2026-03-18T22:10:00Z",
"type": "action_executed",
"detail": "AdjustResources: memory limit 512Mi -> 1Gi"
},
{
"timestamp": "2026-03-18T22:45:00Z",
"type": "resolved",
"detail": "Pods estáveis após o ajuste de recursos"
}
],
"actionsExecuted": [
{
"action": "AdjustResources",
"params": {
"memory_limit": "1Gi"
},
"result": "success",
"detail": "limite de memória atualizado",
"timestamp": "2026-03-18T22:10:00Z"
}
],
"feedback": {
"remediationAccuracy": 4,
"comments": "Diagnóstico correto; mudar o limite foi o primeiro passo certo.",
"providedBy": "sre-oncall",
"providedAt": "2026-03-19T09:00:00Z"
},
"generatedAt": "2026-03-18T22:45:00Z",
"creationTimestamp": "2026-03-18T22:45:00Z"
},
"resourceMeta": {
"name": "pm-checkout-service-oom-kill-1773871200",
"namespace": "production",
"uid": "3d9b8e61-2f4a-4b7c-8e15-6a0c9f2d7b43",
"creationTimestamp": "2026-03-18T22:45:00Z"
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "postmortem not found: postmortems.platform.chatcli.io \"pm-checkout-service-oom-kill-1773871200\" not found"
}
Autorizações
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).
Parâmetros de caminho
PostMortem name.
"pm-payment-service-oom-1710860400"
Parâmetros de consulta
Namespace of the object. Defaults to default — pass it for objects in any other namespace.