---
title: 배포 이벤트 패치
description: 배포의 변경 실패 상태를 업데이트합니다. 이를 통해 배포를 변경 실패 또는 안정 상태로 표시합니다. 실패한 배포 복구 시간 계산을 활성화하기 위해 수정 세부 정보를 필요시 포함할 수 있습니다.
breadcrumbs: 문서 > API > 배포 이벤트 패치
---

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

# 배포 이벤트 패치

## v2 (latest)

| Datadog site      | API endpoint                                                                |
| ----------------- | --------------------------------------------------------------------------- |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/dora/deployments/{deployment_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/dora/deployments/{deployment_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/dora/deployments/{deployment_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/dora/deployments/{deployment_id}      |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/dora/deployments/{deployment_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/dora/deployments/{deployment_id} |
| uk1.datadoghq.com | PATCH https://api.uk1.datadoghq.com/api/v2/dora/deployments/{deployment_id} |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/dora/deployments/{deployment_id}      |
| us2.ddog-gov.com  | PATCH https://api.us2.ddog-gov.com/api/v2/dora/deployments/{deployment_id}  |

### Overview

배포의 변경 실패 상태를 업데이트합니다. 이를 통해 배포를 변경 실패 또는 안정 상태로 표시합니다. 실패한 배포 복구 시간 계산을 활성화하기 위해 수정 세부 정보를 필요시 포함할 수 있습니다.

This endpoint requires the `dora_metrics_write` permission.

### Arguments

#### Path Parameters

| Field                      | Type   | Description                     |
| -------------------------- | ------ | ------------------------------- |
| deployment_id [*required*] | string | The ID of the deployment event. |

### Request

#### Body Data (required)

{% tabs %}
{% tab label="Model" %}
| Parent field | Field                   | Type    | Description                                                                                                                                                                                         |
| ------------ | ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object  | DORA 배포 이벤트를 패치하도록 요청합니다.                                                                                                                                                                           |
| data         | attributes [*required*] | object  | Attributes for patching a DORA deployment event.                                                                                                                                                    |
| attributes   | change_failure          | boolean | Indicates whether the deployment resulted in a change failure.                                                                                                                                      |
| attributes   | remediation             | object  | Remediation details for the deployment. Optional, but required to calculate failed deployment recovery time. Specify either `id` or `version` to identify the remediation deployment, but not both. |
| remediation  | id                      | string  | The ID of the remediation deployment. Use this or `version` to identify the remediation deployment, but not both.                                                                                   |
| remediation  | type                    | enum    | The type of remediation action taken. Required when the failed deployment must be linked to a remediation deployment. Allowed enum values: `rollback`, `rollforward`.                               |
| remediation  | version                 | string  | The version of the remediation deployment, matched against the same service and environment as the failed deployment. Use this or `id` to identify the remediation deployment, but not both.        |
| data         | id [*required*]         | string  | The ID of the deployment to patch.                                                                                                                                                                  |
| data         | type [*required*]       | enum    | JSON:API type for DORA deployment patch request. Allowed enum values: `dora_deployment_patch_request`. Default: `dora_deployment_patch_request`.                                                    |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "change_failure": true,
      "remediation": {
        "id": "eG42zNIkVjM",
        "type": "rollback",
        "version": "v1.2.4"
      }
    },
    "id": "z_RwVLi7v4Y",
    "type": "dora_deployment_patch_request"
  }
}
```
{% /tab %}
{% /tabs %}

### Response

{% tabs %}
{% tab label="202" %}
Accepted
{% /tab %}

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

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

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Not Authorized

{% 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 deployment_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 PATCH "https://api.${DD_SITE}/api/v2/dora/deployments/${deployment_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "change_failure": true,
      "remediation": {
        "id": "eG42zNIkVjM",
        "type": "rollback"
      }
    },
    "id": "z_RwVLi7v4Y",
    "type": "dora_deployment_patch_request"
  }
}
EOF
```
{% /tab %}
{% /tabs %}
