---
title: AI가 생성한 인시던트 포스트모템 가져오기
description: 인시던트에 대한 AI 포스트모템을 생성합니다.
breadcrumbs: 문서 > API > AI가 생성한 인시던트 포스트모템 가져오기
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/llms.txt).

# AI가 생성한 인시던트 포스트모템 가져오기

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                                    |
| ----------------- | ------------------------------------------------------------------------------- |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortem     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortem |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortem |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/incidents/{incident_id}/ai/postmortem      |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortem |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortem |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/incidents/{incident_id}/ai/postmortem |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/incidents/{incident_id}/ai/postmortem      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/incidents/{incident_id}/ai/postmortem  |

### Overview

인시던트에 대한 AI 포스트모템을 생성합니다.

This endpoint requires the `incident_write` permission.

OAuth apps require the `incident_write` authorization [scope](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/scopes.md#incidents) to access this endpoint.

### Arguments

#### Path Parameters

| Field                    | Type   | Description               |
| ------------------------ | ------ | ------------------------- |
| incident_id [*required*] | string | The UUID of the incident. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response with an AI-generated incident postmortem.

| Parent field | Field                   | Type   | Description                                                                                       |
| ------------ | ----------------------- | ------ | ------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object | AI postmortem data in a response.                                                                 |
| data         | attributes [*required*] | object | Attributes of an AI-generated incident postmortem.                                                |
| attributes   | action_items            | string | Action items to prevent recurrence.                                                               |
| attributes   | customer_impact         | string | The impact of the incident on customers.                                                          |
| attributes   | executive_summary       | string | An executive summary of the incident.                                                             |
| attributes   | key_timeline            | string | Key timeline events during the incident.                                                          |
| attributes   | lessons_learned         | string | Lessons learned from the incident.                                                                |
| attributes   | system_overview         | string | An overview of the affected systems.                                                              |
| data         | id [*required*]         | uuid   | The incident identifier.                                                                          |
| data         | type [*required*]       | enum   | AI postmortem response resource type. Allowed enum values: `get_incident_ai_postmortem_response`. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "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"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="401" %}
Unauthorized

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export incident_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, 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}"
```
{% /tab %}
{% /tabs %}
