デプロイイベントのパッチ適用
https://api.datadoghq.com/api/v2/dora/deployments/{deployment_id}https://api.us3.datadoghq.com/api/v2/dora/deployments/{deployment_id}https://api.us5.datadoghq.com/api/v2/dora/deployments/{deployment_id}https://api.datadoghq.eu/api/v2/dora/deployments/{deployment_id}https://api.ap1.datadoghq.com/api/v2/dora/deployments/{deployment_id}https://api.ap2.datadoghq.com/api/v2/dora/deployments/{deployment_id}https://api.uk1.datadoghq.com/api/v2/dora/deployments/{deployment_id}https://api.ddog-gov.com/api/v2/dora/deployments/{deployment_id}https://api.us2.ddog-gov.com/api/v2/dora/deployments/{deployment_id}概要
デプロイの変更失敗ステータスを更新します。これを使用して、デプロイを変更失敗としてマークするか、安定状態に戻します。必要に応じて修復の詳細を含めることで、失敗したデプロイの復旧時間の計算を有効にできます。
引数
パスパラメーター
deployment_id [required]The ID of the deployment event.
リクエスト
Body Data (required)
data [required]DORA デプロイイベントにパッチを適用するためのリクエスト。
attributes [required]Attributes for patching a DORA deployment event.
change_failureIndicates whether the deployment resulted in a change failure.
remediationRemediation 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.
idThe ID of the remediation deployment. Use this or version to identify the remediation deployment, but not both.
typeThe type of remediation action taken. Required when the failed deployment must be linked to a remediation deployment.
rollback, rollforwardversionThe 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.
id [required]The ID of the deployment to patch.
type [required]JSON:API type for DORA deployment patch request.
dora_deployment_patch_requestdora_deployment_patch_request{
"data": {
"attributes": {
"change_failure": true,
"remediation": {
"id": "eG42zNIkVjM",
"type": "rollback",
"version": "v1.2.4"
}
},
"id": "z_RwVLi7v4Y",
"type": "dora_deployment_patch_request"
}
}応答
Accepted
Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Not Authorized
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"
]
}コード例
# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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# Path parameters
export deployment_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 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