For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ja/api/latest/status-pages/update-maintenance.md. A documentation index is available at /llms.txt.
Language
Datadog site

Update maintenance

PATCHhttps://api.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.datadoghq.eu/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.uk1.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.ddog-gov.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}https://api.us2.ddog-gov.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}

概要

Updates an existing maintenance's attributes.

This endpoint requires the status_pages_incident_write permission.

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

引数

パスパラメーター

名前
タイプ
説明
page_id [required]
string

The ID of the status page.

maintenance_id [required]
string

The ID of the maintenance.

クエリ文字列

名前
タイプ
説明
notify_subscribers
boolean

Whether to notify page subscribers of the maintenance.

Default: true
include
string

Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page.

リクエスト

Body Data (required)

フィールド
タイプ
説明
data
object

The data object for updating a maintenance.

応答

OK

Response object for a single maintenance.

フィールド
タイプ
説明
data
object

The data object for a maintenance.

included
[<oneOf>]

The included related resources of a maintenance. Client must explicitly request these resources by name in the include query parameter.

コード例

Update maintenance returns "OK" response
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF
# Path parameters
export page_id="CHANGE_ME"
export maintenance_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/statuspages/${page_id}/maintenances/${maintenance_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "scheduled_description": "We will be performing maintenance on the API to improve performance for 40 minutes.",
      "in_progress_description": "We are currently performing maintenance on the API to improve performance for 40 minutes."
    },
    "id": "6a167dcd-4975-9fda-c895-ee008c4256f9",
    "type": "maintenances"
  }
}
EOF