Get an AI-generated incident postmortem

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.ap2.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://api.datadoghq.eu/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/postmortemhttps://api.uk1.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortemhttps://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/postmortem

Overview

Generate an AI postmortem for an incident. This endpoint requires the incident_write permission.

OAuth apps require the incident_write authorization scope to access this endpoint.

Arguments

Path Parameters

Name

Type

Description

incident_id [required]

string

The UUID of the incident.

Response

OK

Response with an AI-generated incident postmortem.

Expand All

Field

Type

Description

data [required]

object

AI postmortem data in a response.

attributes [required]

object

Attributes of an AI-generated incident postmortem.

action_items

string

Action items to prevent recurrence.

customer_impact

string

The impact of the incident on customers.

executive_summary

string

An executive summary of the incident.

key_timeline

string

Key timeline events during the incident.

lessons_learned

string

Lessons learned from the incident.

system_overview

string

An overview of the affected systems.

id [required]

uuid

The incident identifier.

type [required]

enum

AI postmortem response resource type. Allowed enum values: 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.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  # Path parameters
export incident_id="CHANGE_ME"
# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/incidents/${incident_id}/ai/postmortem" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"