Get a single post-mortem document by ID.
This returns the documentβs metadata. To retrieve the content of the post-mortem, use the ShowContent endpoint.
GET
/
v1
/
postmortem_documents
/
{id}
Show
curl --request GET \
--url https://api.incident.io/v1/postmortem_documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.incident.io/v1/postmortem_documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.incident.io/v1/postmortem_documents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v1/postmortem_documents/{id}",
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: Bearer <token>"
],
]);
$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 := "https://api.incident.io/v1/postmortem_documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.incident.io/v1/postmortem_documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v1/postmortem_documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"postmortem_document": {
"created_at": "2021-08-17T13:28:57.801578Z",
"document_url": "https://app.incident.io/my-org/incidents/123/post-mortems/01GDZEW57FDA1K4S63MGMQ5DS9",
"editors": [
{
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
],
"exported_urls": [
"https://www.notion.so/INC-123-sad-database",
"https://docs.google.com/document/d/1234"
],
"id": "01GDZEW57FDA1K4S63MGMQ5DS9",
"incident_id": "01GBA8J19SMXQWPJMX3P2ESCVG",
"status": "in_progress",
"title": "INC-123: Database is sad",
"type": "in_app",
"updated_at": "abc123"
}
}π Requires the
incidents.view scope.Authorizations
API key from your incident.io dashboard (Settings β API keys)
Path Parameters
Unique identifier for the post-mortem document
Example:
"01GDZEW57FDA1K4S63MGMQ5DS9"
Response
200 - application/json
OK response.
Show child attributes
Show child attributes
Was this page helpful?
βI
Show
curl --request GET \
--url https://api.incident.io/v1/postmortem_documents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.incident.io/v1/postmortem_documents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.incident.io/v1/postmortem_documents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.incident.io/v1/postmortem_documents/{id}",
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: Bearer <token>"
],
]);
$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 := "https://api.incident.io/v1/postmortem_documents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.incident.io/v1/postmortem_documents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.incident.io/v1/postmortem_documents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"postmortem_document": {
"created_at": "2021-08-17T13:28:57.801578Z",
"document_url": "https://app.incident.io/my-org/incidents/123/post-mortems/01GDZEW57FDA1K4S63MGMQ5DS9",
"editors": [
{
"email": "lisa@incident.io",
"id": "01FCNDV6P870EA6S7TK1DSYDG0",
"name": "Lisa Karlin Curtis",
"role": "viewer",
"slack_user_id": "U02AYNF2XJM"
}
],
"exported_urls": [
"https://www.notion.so/INC-123-sad-database",
"https://docs.google.com/document/d/1234"
],
"id": "01GDZEW57FDA1K4S63MGMQ5DS9",
"incident_id": "01GBA8J19SMXQWPJMX3P2ESCVG",
"status": "in_progress",
"title": "INC-123: Database is sad",
"type": "in_app",
"updated_at": "abc123"
}
}