curl --request POST \
--url {scheme}://{host}:{port}/{basePath}/postmortems/{name}/review \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reviewer": "sre-oncall",
"notes": "Root cause confirmed. Adding an action item for rate limiting."
}
'import requests
url = "{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review"
payload = {
"reviewer": "sre-oncall",
"notes": "Root cause confirmed. Adding an action item for rate limiting."
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reviewer: 'sre-oncall',
notes: 'Root cause confirmed. Adding an action item for rate limiting.'
})
};
fetch('{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review', 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}/review",
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([
'reviewer' => 'sre-oncall',
'notes' => 'Root cause confirmed. Adding an action item for rate limiting.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review"
payload := strings.NewReader("{\n \"reviewer\": \"sre-oncall\",\n \"notes\": \"Root cause confirmed. Adding an action item for rate limiting.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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("{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reviewer\": \"sre-oncall\",\n \"notes\": \"Root cause confirmed. Adding an action item for rate limiting.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reviewer\": \"sre-oncall\",\n \"notes\": \"Root cause confirmed. Adding an action item for rate limiting.\"\n}"
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": "InReview",
"duration": "45m0s",
"generatedAt": "2026-03-18T22:45:00Z",
"reviewedAt": "2026-03-19T17:00: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": "InReview",
"duration": "45m0s",
"generatedAt": "2026-03-18T22:45:00Z",
"reviewedAt": "2026-03-19T17:00: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",
"annotations": {
"aiops.chatcli.io/reviewed-by": "sre-oncall",
"aiops.chatcli.io/review-notes": "Causa raiz confirmada."
}
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Conflict",
"code": 409,
"message": "postmortem was modified concurrently, please retry"
}
Revisar PostMortem
Move um postmortem para o estado InReview, indicando que uma pessoa está revisando a análise gerada pela IA
curl --request POST \
--url {scheme}://{host}:{port}/{basePath}/postmortems/{name}/review \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reviewer": "sre-oncall",
"notes": "Root cause confirmed. Adding an action item for rate limiting."
}
'import requests
url = "{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review"
payload = {
"reviewer": "sre-oncall",
"notes": "Root cause confirmed. Adding an action item for rate limiting."
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reviewer: 'sre-oncall',
notes: 'Root cause confirmed. Adding an action item for rate limiting.'
})
};
fetch('{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review', 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}/review",
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([
'reviewer' => 'sre-oncall',
'notes' => 'Root cause confirmed. Adding an action item for rate limiting.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review"
payload := strings.NewReader("{\n \"reviewer\": \"sre-oncall\",\n \"notes\": \"Root cause confirmed. Adding an action item for rate limiting.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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("{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reviewer\": \"sre-oncall\",\n \"notes\": \"Root cause confirmed. Adding an action item for rate limiting.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/{basePath}/postmortems/{name}/review")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reviewer\": \"sre-oncall\",\n \"notes\": \"Root cause confirmed. Adding an action item for rate limiting.\"\n}"
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": "InReview",
"duration": "45m0s",
"generatedAt": "2026-03-18T22:45:00Z",
"reviewedAt": "2026-03-19T17:00: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": "InReview",
"duration": "45m0s",
"generatedAt": "2026-03-18T22:45:00Z",
"reviewedAt": "2026-03-19T17:00: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",
"annotations": {
"aiops.chatcli.io/reviewed-by": "sre-oncall",
"aiops.chatcli.io/review-notes": "Causa raiz confirmada."
}
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Conflict",
"code": 409,
"message": "postmortem was modified concurrently, please retry"
}
pm-checkout-service-oom-kill-1773871200)default é pesquisado)aiops.chatcli.io/reviewed-by.aiops.chatcli.io/review-notes, e somente quando reviewer também é enviado.Quando usar
PostMortems são gerados quando um incidente é resolvido ou contido. Este endpoint permite ao time:- Marcar como em revisão: define
status.statecomoInReviewestatus.reviewedAtcom o horário atual - Registrar quem está revisando: os campos opcionais
reviewer/notesviram annotations no PostMortem - Separar postmortems revisados dos não revisados:
Opensignifica que ninguém olhou ainda
operator. Não há trava de estado: a chamada também funciona em um postmortem Closed e o devolve para InReview.
{
"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": "InReview",
"duration": "45m0s",
"generatedAt": "2026-03-18T22:45:00Z",
"reviewedAt": "2026-03-19T17:00: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": "InReview",
"duration": "45m0s",
"generatedAt": "2026-03-18T22:45:00Z",
"reviewedAt": "2026-03-19T17:00: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",
"annotations": {
"aiops.chatcli.io/reviewed-by": "sre-oncall",
"aiops.chatcli.io/review-notes": "Causa raiz confirmada."
}
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Conflict",
"code": 409,
"message": "postmortem was modified concurrently, please retry"
}
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.