Generate postmortem
curl --request POST \
--url http://localhost:8080/api/v1/incidents/{incident}/postmortem \
--header 'Content-Type: application/json' \
--header 'X-OpenCluster-Organization: <x-opencluster-organization>' \
--cookie __Host-oc_session= \
--data '
{
"impact": "<string>",
"resolution": "<string>",
"whatWentWell": [
"<string>"
],
"whatWentWrong": [
"<string>"
],
"detectionGaps": [
"<string>"
]
}
'import requests
url = "http://localhost:8080/api/v1/incidents/{incident}/postmortem"
payload = {
"impact": "<string>",
"resolution": "<string>",
"whatWentWell": ["<string>"],
"whatWentWrong": ["<string>"],
"detectionGaps": ["<string>"]
}
headers = {
"cookie": "__Host-oc_session=",
"X-OpenCluster-Organization": "<x-opencluster-organization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-oc_session=',
'X-OpenCluster-Organization': '<x-opencluster-organization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
impact: '<string>',
resolution: '<string>',
whatWentWell: ['<string>'],
whatWentWrong: ['<string>'],
detectionGaps: ['<string>']
})
};
fetch('http://localhost:8080/api/v1/incidents/{incident}/postmortem', 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 => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/incidents/{incident}/postmortem",
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([
'impact' => '<string>',
'resolution' => '<string>',
'whatWentWell' => [
'<string>'
],
'whatWentWrong' => [
'<string>'
],
'detectionGaps' => [
'<string>'
]
]),
CURLOPT_COOKIE => "__Host-oc_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-OpenCluster-Organization: <x-opencluster-organization>"
],
]);
$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://localhost:8080/api/v1/incidents/{incident}/postmortem"
payload := strings.NewReader("{\n \"impact\": \"<string>\",\n \"resolution\": \"<string>\",\n \"whatWentWell\": [\n \"<string>\"\n ],\n \"whatWentWrong\": [\n \"<string>\"\n ],\n \"detectionGaps\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-oc_session=")
req.Header.Add("X-OpenCluster-Organization", "<x-opencluster-organization>")
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://localhost:8080/api/v1/incidents/{incident}/postmortem")
.header("cookie", "__Host-oc_session=")
.header("X-OpenCluster-Organization", "<x-opencluster-organization>")
.header("Content-Type", "application/json")
.body("{\n \"impact\": \"<string>\",\n \"resolution\": \"<string>\",\n \"whatWentWell\": [\n \"<string>\"\n ],\n \"whatWentWrong\": [\n \"<string>\"\n ],\n \"detectionGaps\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/incidents/{incident}/postmortem")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-oc_session='
request["X-OpenCluster-Organization"] = '<x-opencluster-organization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"impact\": \"<string>\",\n \"resolution\": \"<string>\",\n \"whatWentWell\": [\n \"<string>\"\n ],\n \"whatWentWrong\": [\n \"<string>\"\n ],\n \"detectionGaps\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"incidentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"revision": 2,
"title": "<string>",
"executiveSummary": "<string>",
"impact": "<string>",
"detection": "<string>",
"timeline": [
{
"at": "2023-11-07T05:31:56Z",
"description": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"rootCauses": [
{
"statement": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>"
}
],
"contributingFactors": [
{
"statement": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>"
}
],
"resolution": "<string>",
"whatWentWell": [
"<string>"
],
"whatWentWrong": [
"<string>"
],
"detectionGaps": [
"<string>"
],
"actionItems": [
{
"title": "<string>",
"owner": "<string>",
"deadline": "<string>",
"verification": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"openQuestions": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reviewedAt": "2023-11-07T05:31:56Z",
"reviewedBy": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}Postmortems
Generate postmortem
POST
/
api
/
v1
/
incidents
/
{incident}
/
postmortem
Generate postmortem
curl --request POST \
--url http://localhost:8080/api/v1/incidents/{incident}/postmortem \
--header 'Content-Type: application/json' \
--header 'X-OpenCluster-Organization: <x-opencluster-organization>' \
--cookie __Host-oc_session= \
--data '
{
"impact": "<string>",
"resolution": "<string>",
"whatWentWell": [
"<string>"
],
"whatWentWrong": [
"<string>"
],
"detectionGaps": [
"<string>"
]
}
'import requests
url = "http://localhost:8080/api/v1/incidents/{incident}/postmortem"
payload = {
"impact": "<string>",
"resolution": "<string>",
"whatWentWell": ["<string>"],
"whatWentWrong": ["<string>"],
"detectionGaps": ["<string>"]
}
headers = {
"cookie": "__Host-oc_session=",
"X-OpenCluster-Organization": "<x-opencluster-organization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Host-oc_session=',
'X-OpenCluster-Organization': '<x-opencluster-organization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
impact: '<string>',
resolution: '<string>',
whatWentWell: ['<string>'],
whatWentWrong: ['<string>'],
detectionGaps: ['<string>']
})
};
fetch('http://localhost:8080/api/v1/incidents/{incident}/postmortem', 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 => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/incidents/{incident}/postmortem",
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([
'impact' => '<string>',
'resolution' => '<string>',
'whatWentWell' => [
'<string>'
],
'whatWentWrong' => [
'<string>'
],
'detectionGaps' => [
'<string>'
]
]),
CURLOPT_COOKIE => "__Host-oc_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-OpenCluster-Organization: <x-opencluster-organization>"
],
]);
$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://localhost:8080/api/v1/incidents/{incident}/postmortem"
payload := strings.NewReader("{\n \"impact\": \"<string>\",\n \"resolution\": \"<string>\",\n \"whatWentWell\": [\n \"<string>\"\n ],\n \"whatWentWrong\": [\n \"<string>\"\n ],\n \"detectionGaps\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-oc_session=")
req.Header.Add("X-OpenCluster-Organization", "<x-opencluster-organization>")
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://localhost:8080/api/v1/incidents/{incident}/postmortem")
.header("cookie", "__Host-oc_session=")
.header("X-OpenCluster-Organization", "<x-opencluster-organization>")
.header("Content-Type", "application/json")
.body("{\n \"impact\": \"<string>\",\n \"resolution\": \"<string>\",\n \"whatWentWell\": [\n \"<string>\"\n ],\n \"whatWentWrong\": [\n \"<string>\"\n ],\n \"detectionGaps\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/incidents/{incident}/postmortem")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-oc_session='
request["X-OpenCluster-Organization"] = '<x-opencluster-organization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"impact\": \"<string>\",\n \"resolution\": \"<string>\",\n \"whatWentWell\": [\n \"<string>\"\n ],\n \"whatWentWrong\": [\n \"<string>\"\n ],\n \"detectionGaps\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"incidentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "draft",
"revision": 2,
"title": "<string>",
"executiveSummary": "<string>",
"impact": "<string>",
"detection": "<string>",
"timeline": [
{
"at": "2023-11-07T05:31:56Z",
"description": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"rootCauses": [
{
"statement": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>"
}
],
"contributingFactors": [
{
"statement": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"findingId": "<string>"
}
],
"resolution": "<string>",
"whatWentWell": [
"<string>"
],
"whatWentWrong": [
"<string>"
],
"detectionGaps": [
"<string>"
],
"actionItems": [
{
"title": "<string>",
"owner": "<string>",
"deadline": "<string>",
"verification": "<string>",
"runRefs": [
2
],
"investigationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"openQuestions": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"reviewedAt": "2023-11-07T05:31:56Z",
"reviewedBy": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}Authorizations
Headers
Selects the Organization whose data and membership are authorized.
Required string length:
1 - 63Pattern:
^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$Path Parameters
Body
application/json
Response
Postmortem.
Available options:
draft, reviewed Required range:
x >= 1Required string length:
1 - 1024Required string length:
1 - 32768Required string length:
1 - 32768Required string length:
1 - 32768Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required string length:
1 - 32768Maximum string length:
8192Maximum string length:
8192Maximum string length:
8192Show child attributes
Show child attributes
Maximum string length:
8192Maximum string length:
256