Get an AI-generated incident postmortem
https://api.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.us3.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.us5.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.datadoghq.eu/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.ap1.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.ap2.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.uk1.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.ddog-gov.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.us2.ddog-gov.com/api/v2/incidents/{incident_id}/ai/postmortemOverview
Generate an AI postmortem for an incident.
OAuth apps require the incident_write authorization scope to access this endpoint.
Arguments
Path Parameters
incident_id [required]The UUID of the incident.
Response
OK
Response with an AI-generated incident postmortem.
data [required]AI postmortem data in a response.
attributes [required]Attributes of an AI-generated incident postmortem.
action_itemsAction items to prevent recurrence.
customer_impactThe impact of the incident on customers.
executive_summaryAn executive summary of the incident.
key_timelineKey timeline events during the incident.
lessons_learnedLessons learned from the incident.
system_overviewAn overview of the affected systems.
id [required]The incident identifier.
type [required]AI postmortem response resource type.
get_incident_ai_postmortem_response{
"data": {
"attributes": {
"action_items": "1. Improve failover testing. 2. Add more monitoring alerts.",
"customer_impact": "5% of users experienced timeouts for 30 minutes.",
"executive_summary": "A database failover caused a 30-minute service outage affecting 5% of users.",
"key_timeline": "10:00 - Alert fired. 10:05 - On-call engineer paged. 10:30 - Issue resolved.",
"lessons_learned": "We need to test the failover process under realistic load conditions.",
"system_overview": "The primary database cluster experienced a failover event."
},
"id": "00000000-0000-0000-0000-000000000000",
"type": "get_incident_ai_postmortem_response"
}
}Bad Request
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Unauthorized
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Not Found
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Code Example
# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export incident_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/${incident_id}/ai/postmortem" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"