Get Postmortem
curl --request GET \
--url http://{host}:{port}/{basePath}/postmortems/{name} \
--header 'Authorization: <api-key>'import requests
url = "http://{host}:{port}/{basePath}/postmortems/{name}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('http://{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 => "http://{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 => [
"Authorization: <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 := "http://{host}:{port}/{basePath}/postmortems/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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("http://{host}:{port}/{basePath}/postmortems/{name}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{basePath}/postmortems/{name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "PostMortem",
"metadata": {
"name": "PM-20260318-001",
"incident": "INC-20260318-003",
"createdAt": "2026-03-18T23:00:00Z",
"author": "ai-generated",
"reviewedBy": "carlos.silva@empresa.com"
},
"report": {
"title": "OOMKill recorrente no checkout-service",
"severity": "critical",
"duration": "45m",
"detectedAt": "2026-03-18T22:00:00Z",
"resolvedAt": "2026-03-18T22:45:00Z",
"summary": "O checkout-service sofreu multiplos OOMKills durante 45 minutos devido a um memory leak no handler de webhook de pagamento. O incidente afetou 3.2% das requests de checkout e foi resolvido automaticamente pelo operator apos aprovacao.",
"impact": {
"usersAffected": 1250,
"requestsAffected": "3.2%",
"revenueImpact": "estimado R$ 15.000",
"slosBreached": ["slo-checkout-error-rate"]
},
"rootCause": {
"description": "Memory leak no handler de webhook de pagamento. O handler nao fechava o body do HTTP response em caso de erro de validacao, causando acumulo de buffers na heap.",
"category": "code-bug",
"confidence": 0.91
},
"timeline": [
{
"time": "2026-03-18T22:00:00Z",
"event": "Primeiro OOMKill detectado no pod checkout-service-5f8d7c6b4-k9m2n"
},
{
"time": "2026-03-18T22:02:00Z",
"event": "Decision engine inicia analise automatica"
},
{
"time": "2026-03-18T22:03:30Z",
"event": "Root cause identificado: memory leak no webhook handler"
},
{
"time": "2026-03-18T22:05:00Z",
"event": "Runbook 'oomkill-standard' selecionado, aprovacao solicitada"
},
{
"time": "2026-03-18T22:08:00Z",
"event": "Aprovacao concedida por carlos.silva@empresa.com"
},
{
"time": "2026-03-18T22:10:00Z",
"event": "Memory limit aumentado para 1Gi, pods reiniciando"
},
{
"time": "2026-03-18T22:45:00Z",
"event": "Incidente resolvido — pods estaveis por 30 minutos"
}
],
"remediationApplied": {
"runbook": "runbook-oomkill-standard",
"steps": [
"Diagnostico de memoria via kubectl top",
"Patch de memory limit de 512Mi para 1Gi",
"Verificacao de estabilidade por 30 minutos"
],
"result": "success"
},
"actionItems": [
{
"priority": "P1",
"description": "Corrigir memory leak no handler de webhook — fechar response body em todos os paths de erro",
"assignee": "backend-team",
"status": "open",
"dueDate": "2026-03-22"
},
{
"priority": "P2",
"description": "Adicionar metricas de heap usage no checkout-service para deteccao precoce",
"assignee": "platform-team",
"status": "open",
"dueDate": "2026-03-25"
},
{
"priority": "P3",
"description": "Revisar memory limits de todos os servicos do namespace production",
"assignee": "sre-team",
"status": "open",
"dueDate": "2026-03-30"
}
],
"lessonsLearned": [
"Add automated linting to verify response body closure in HTTP handlers",
"Memory limits should be reviewed quarterly based on actual usage metrics",
"OOMKill runbook worked well, but approval took 3 minutes — consider auto-approve for riskScore < 50"
],
"metricSnapshots": [
{"name": "cpu_usage", "value": "0.45", "timestamp": "2026-03-18T21:55:00Z", "phase": "before"},
{"name": "memory_usage", "value": "498000000", "timestamp": "2026-03-18T22:00:00Z", "phase": "during"},
{"name": "memory_usage", "value": "312000000", "timestamp": "2026-03-18T22:30:00Z", "phase": "after"}
],
"blastRadius": [
{"resource": {"kind": "Service", "name": "checkout-svc", "namespace": "production"}, "impact": "5xx responses during pod restarts", "severity": "high"}
],
"gitCorrelation": {
"commitSHA": "a1b2c3d4",
"commitMessage": "feat: add webhook handler for payment notifications",
"author": "dev@company.com",
"timestamp": "2026-03-18T19:30:00Z",
"confidence": 0.82,
"filesChanged": ["internal/webhook/handler.go", "internal/webhook/handler_test.go"]
},
"trending": {
"occurrenceCount": 3,
"windowDays": 30,
"relatedPostMortems": ["PM-20260305-001", "PM-20260312-002"],
"pattern": "Recurring oom_kill on Deployment/checkout-service (3 occurrences in 30 days)"
},
"gitOpsContext": "Helm release 'checkout' chart=checkout version=2.3.1 status=deployed revision=42",
"logAnalysisSummary": "1 Go panic stack trace; 12 critical error patterns (resource/connectivity); Primary exception: panic: runtime error: invalid memory address",
"cascadeChain": ["production/checkout-service(root_cause)", "production/api-gateway(victim)"],
"feedback": {
"overrideRootCause": "",
"remediationAccuracy": 4,
"comments": "Good analysis. Consider suggesting AdjustResources before restart next time.",
"providedBy": "sre@company.com",
"providedAt": "2026-03-19T09:00:00Z"
}
}
}
PostMortems
Get PostMortem
Returns the complete postmortem for an incident, including root cause analysis, timeline, and action items
GET
/
postmortems
/
{name}
Get Postmortem
curl --request GET \
--url http://{host}:{port}/{basePath}/postmortems/{name} \
--header 'Authorization: <api-key>'import requests
url = "http://{host}:{port}/{basePath}/postmortems/{name}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('http://{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 => "http://{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 => [
"Authorization: <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 := "http://{host}:{port}/{basePath}/postmortems/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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("http://{host}:{port}/{basePath}/postmortems/{name}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{basePath}/postmortems/{name}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"apiVersion": "v1",
"kind": "PostMortem",
"metadata": {
"name": "PM-20260318-001",
"incident": "INC-20260318-003",
"createdAt": "2026-03-18T23:00:00Z",
"author": "ai-generated",
"reviewedBy": "carlos.silva@empresa.com"
},
"report": {
"title": "OOMKill recorrente no checkout-service",
"severity": "critical",
"duration": "45m",
"detectedAt": "2026-03-18T22:00:00Z",
"resolvedAt": "2026-03-18T22:45:00Z",
"summary": "O checkout-service sofreu multiplos OOMKills durante 45 minutos devido a um memory leak no handler de webhook de pagamento. O incidente afetou 3.2% das requests de checkout e foi resolvido automaticamente pelo operator apos aprovacao.",
"impact": {
"usersAffected": 1250,
"requestsAffected": "3.2%",
"revenueImpact": "estimado R$ 15.000",
"slosBreached": ["slo-checkout-error-rate"]
},
"rootCause": {
"description": "Memory leak no handler de webhook de pagamento. O handler nao fechava o body do HTTP response em caso de erro de validacao, causando acumulo de buffers na heap.",
"category": "code-bug",
"confidence": 0.91
},
"timeline": [
{
"time": "2026-03-18T22:00:00Z",
"event": "Primeiro OOMKill detectado no pod checkout-service-5f8d7c6b4-k9m2n"
},
{
"time": "2026-03-18T22:02:00Z",
"event": "Decision engine inicia analise automatica"
},
{
"time": "2026-03-18T22:03:30Z",
"event": "Root cause identificado: memory leak no webhook handler"
},
{
"time": "2026-03-18T22:05:00Z",
"event": "Runbook 'oomkill-standard' selecionado, aprovacao solicitada"
},
{
"time": "2026-03-18T22:08:00Z",
"event": "Aprovacao concedida por carlos.silva@empresa.com"
},
{
"time": "2026-03-18T22:10:00Z",
"event": "Memory limit aumentado para 1Gi, pods reiniciando"
},
{
"time": "2026-03-18T22:45:00Z",
"event": "Incidente resolvido — pods estaveis por 30 minutos"
}
],
"remediationApplied": {
"runbook": "runbook-oomkill-standard",
"steps": [
"Diagnostico de memoria via kubectl top",
"Patch de memory limit de 512Mi para 1Gi",
"Verificacao de estabilidade por 30 minutos"
],
"result": "success"
},
"actionItems": [
{
"priority": "P1",
"description": "Corrigir memory leak no handler de webhook — fechar response body em todos os paths de erro",
"assignee": "backend-team",
"status": "open",
"dueDate": "2026-03-22"
},
{
"priority": "P2",
"description": "Adicionar metricas de heap usage no checkout-service para deteccao precoce",
"assignee": "platform-team",
"status": "open",
"dueDate": "2026-03-25"
},
{
"priority": "P3",
"description": "Revisar memory limits de todos os servicos do namespace production",
"assignee": "sre-team",
"status": "open",
"dueDate": "2026-03-30"
}
],
"lessonsLearned": [
"Add automated linting to verify response body closure in HTTP handlers",
"Memory limits should be reviewed quarterly based on actual usage metrics",
"OOMKill runbook worked well, but approval took 3 minutes — consider auto-approve for riskScore < 50"
],
"metricSnapshots": [
{"name": "cpu_usage", "value": "0.45", "timestamp": "2026-03-18T21:55:00Z", "phase": "before"},
{"name": "memory_usage", "value": "498000000", "timestamp": "2026-03-18T22:00:00Z", "phase": "during"},
{"name": "memory_usage", "value": "312000000", "timestamp": "2026-03-18T22:30:00Z", "phase": "after"}
],
"blastRadius": [
{"resource": {"kind": "Service", "name": "checkout-svc", "namespace": "production"}, "impact": "5xx responses during pod restarts", "severity": "high"}
],
"gitCorrelation": {
"commitSHA": "a1b2c3d4",
"commitMessage": "feat: add webhook handler for payment notifications",
"author": "dev@company.com",
"timestamp": "2026-03-18T19:30:00Z",
"confidence": 0.82,
"filesChanged": ["internal/webhook/handler.go", "internal/webhook/handler_test.go"]
},
"trending": {
"occurrenceCount": 3,
"windowDays": 30,
"relatedPostMortems": ["PM-20260305-001", "PM-20260312-002"],
"pattern": "Recurring oom_kill on Deployment/checkout-service (3 occurrences in 30 days)"
},
"gitOpsContext": "Helm release 'checkout' chart=checkout version=2.3.1 status=deployed revision=42",
"logAnalysisSummary": "1 Go panic stack trace; 12 critical error patterns (resource/connectivity); Primary exception: panic: runtime error: invalid memory address",
"cascadeChain": ["production/checkout-service(root_cause)", "production/api-gateway(victim)"],
"feedback": {
"overrideRootCause": "",
"remediationAccuracy": 4,
"comments": "Good analysis. Consider suggesting AdjustResources before restart next time.",
"providedBy": "sre@company.com",
"providedAt": "2026-03-19T09:00:00Z"
}
}
}
string
required
Unique postmortem name (e.g.,
PM-20260318-001){
"apiVersion": "v1",
"kind": "PostMortem",
"metadata": {
"name": "PM-20260318-001",
"incident": "INC-20260318-003",
"createdAt": "2026-03-18T23:00:00Z",
"author": "ai-generated",
"reviewedBy": "carlos.silva@empresa.com"
},
"report": {
"title": "OOMKill recorrente no checkout-service",
"severity": "critical",
"duration": "45m",
"detectedAt": "2026-03-18T22:00:00Z",
"resolvedAt": "2026-03-18T22:45:00Z",
"summary": "O checkout-service sofreu multiplos OOMKills durante 45 minutos devido a um memory leak no handler de webhook de pagamento. O incidente afetou 3.2% das requests de checkout e foi resolvido automaticamente pelo operator apos aprovacao.",
"impact": {
"usersAffected": 1250,
"requestsAffected": "3.2%",
"revenueImpact": "estimado R$ 15.000",
"slosBreached": ["slo-checkout-error-rate"]
},
"rootCause": {
"description": "Memory leak no handler de webhook de pagamento. O handler nao fechava o body do HTTP response em caso de erro de validacao, causando acumulo de buffers na heap.",
"category": "code-bug",
"confidence": 0.91
},
"timeline": [
{
"time": "2026-03-18T22:00:00Z",
"event": "Primeiro OOMKill detectado no pod checkout-service-5f8d7c6b4-k9m2n"
},
{
"time": "2026-03-18T22:02:00Z",
"event": "Decision engine inicia analise automatica"
},
{
"time": "2026-03-18T22:03:30Z",
"event": "Root cause identificado: memory leak no webhook handler"
},
{
"time": "2026-03-18T22:05:00Z",
"event": "Runbook 'oomkill-standard' selecionado, aprovacao solicitada"
},
{
"time": "2026-03-18T22:08:00Z",
"event": "Aprovacao concedida por carlos.silva@empresa.com"
},
{
"time": "2026-03-18T22:10:00Z",
"event": "Memory limit aumentado para 1Gi, pods reiniciando"
},
{
"time": "2026-03-18T22:45:00Z",
"event": "Incidente resolvido — pods estaveis por 30 minutos"
}
],
"remediationApplied": {
"runbook": "runbook-oomkill-standard",
"steps": [
"Diagnostico de memoria via kubectl top",
"Patch de memory limit de 512Mi para 1Gi",
"Verificacao de estabilidade por 30 minutos"
],
"result": "success"
},
"actionItems": [
{
"priority": "P1",
"description": "Corrigir memory leak no handler de webhook — fechar response body em todos os paths de erro",
"assignee": "backend-team",
"status": "open",
"dueDate": "2026-03-22"
},
{
"priority": "P2",
"description": "Adicionar metricas de heap usage no checkout-service para deteccao precoce",
"assignee": "platform-team",
"status": "open",
"dueDate": "2026-03-25"
},
{
"priority": "P3",
"description": "Revisar memory limits de todos os servicos do namespace production",
"assignee": "sre-team",
"status": "open",
"dueDate": "2026-03-30"
}
],
"lessonsLearned": [
"Add automated linting to verify response body closure in HTTP handlers",
"Memory limits should be reviewed quarterly based on actual usage metrics",
"OOMKill runbook worked well, but approval took 3 minutes — consider auto-approve for riskScore < 50"
],
"metricSnapshots": [
{"name": "cpu_usage", "value": "0.45", "timestamp": "2026-03-18T21:55:00Z", "phase": "before"},
{"name": "memory_usage", "value": "498000000", "timestamp": "2026-03-18T22:00:00Z", "phase": "during"},
{"name": "memory_usage", "value": "312000000", "timestamp": "2026-03-18T22:30:00Z", "phase": "after"}
],
"blastRadius": [
{"resource": {"kind": "Service", "name": "checkout-svc", "namespace": "production"}, "impact": "5xx responses during pod restarts", "severity": "high"}
],
"gitCorrelation": {
"commitSHA": "a1b2c3d4",
"commitMessage": "feat: add webhook handler for payment notifications",
"author": "dev@company.com",
"timestamp": "2026-03-18T19:30:00Z",
"confidence": 0.82,
"filesChanged": ["internal/webhook/handler.go", "internal/webhook/handler_test.go"]
},
"trending": {
"occurrenceCount": 3,
"windowDays": 30,
"relatedPostMortems": ["PM-20260305-001", "PM-20260312-002"],
"pattern": "Recurring oom_kill on Deployment/checkout-service (3 occurrences in 30 days)"
},
"gitOpsContext": "Helm release 'checkout' chart=checkout version=2.3.1 status=deployed revision=42",
"logAnalysisSummary": "1 Go panic stack trace; 12 critical error patterns (resource/connectivity); Primary exception: panic: runtime error: invalid memory address",
"cascadeChain": ["production/checkout-service(root_cause)", "production/api-gateway(victim)"],
"feedback": {
"overrideRootCause": "",
"remediationAccuracy": 4,
"comments": "Good analysis. Consider suggesting AdjustResources before restart next time.",
"providedBy": "sre@company.com",
"providedAt": "2026-03-19T09:00:00Z"
}
}
}
Authorizations
Bearer token issued by the operator. Format: Authorization: Bearer <token>.
Path Parameters
Unique postmortem name.
Example:
"PM-20260318-001"
⌘I