Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 237 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64404,6 +64404,124 @@ components:
- type
- id
type: object
MaintenanceUpdate:
description: Response object for a maintenance update.
properties:
data:
$ref: "#/components/schemas/MaintenanceUpdateData"
type: object
MaintenanceUpdateData:
description: The data object for a maintenance update.
properties:
attributes:
$ref: "#/components/schemas/MaintenanceUpdateDataAttributes"
id:
description: The ID of the maintenance update.
format: uuid
type: string
relationships:
$ref: "#/components/schemas/MaintenanceUpdateDataRelationships"
type:
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestDataType"
required:
- type
type: object
MaintenanceUpdateDataAttributes:
description: Attributes of a maintenance update resource.
properties:
components_affected:
description: Components affected at the time of the update.
items:
$ref: "#/components/schemas/CreateMaintenanceRequestDataAttributesComponentsAffectedItems"
type: array
created_at:
description: The date and time the update was created.
format: date-time
type: string
description:
description: The message body of the update.
type: string
manual_transition:
description: Whether the update was applied manually by a user (true) or automatically by the system (false).
type: boolean
modified_at:
description: The date and time the update was last modified.
format: date-time
type: string
started_at:
description: The date and time the update started.
format: date-time
type: string
status:
$ref: "#/components/schemas/MaintenanceUpdateDataAttributesStatus"
type: object
MaintenanceUpdateDataAttributesStatus:
description: The status of the maintenance update.
enum:
- scheduled
- in_progress
- completed
- canceled
type: string
x-enum-varnames:
- SCHEDULED
- IN_PROGRESS
- COMPLETED
- CANCELED
MaintenanceUpdateDataRelationships:
description: Relationships of a maintenance update resource.
properties:
created_by_user:
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsUser"
last_modified_by_user:
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsUser"
maintenance:
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsMaintenance"
type: object
MaintenanceUpdateDataRelationshipsMaintenance:
description: The parent maintenance of the update.
properties:
data:
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsMaintenanceData"
required:
- data
type: object
MaintenanceUpdateDataRelationshipsMaintenanceData:
description: The maintenance linked to a maintenance update.
properties:
id:
description: The ID of the maintenance.
example: ""
format: uuid
type: string
type:
$ref: "#/components/schemas/PatchMaintenanceRequestDataType"
required:
- type
- id
type: object
MaintenanceUpdateDataRelationshipsUser:
description: A user relationship of a maintenance update.
properties:
data:
$ref: "#/components/schemas/MaintenanceUpdateDataRelationshipsUserData"
required:
- data
type: object
MaintenanceUpdateDataRelationshipsUserData:
description: The data object identifying a Datadog user linked to a maintenance update.
properties:
id:
description: The ID of the Datadog user.
example: ""
format: uuid
type: string
type:
$ref: "#/components/schemas/StatusPagesUserType"
required:
- type
- id
type: object
MaintenanceWindow:
description: A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query.
properties:
Expand Down Expand Up @@ -80114,6 +80232,50 @@ components:
type: string
x-enum-varnames:
- MAINTENANCE_TEMPLATES
PatchMaintenanceUpdateRequest:
description: Request object for editing a maintenance update.
example:
data:
attributes:
description: We have completed maintenance on the API to improve performance.
id: 00000000-0000-0000-0000-000000000000
type: maintenance_updates
properties:
data:
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestData"
type: object
PatchMaintenanceUpdateRequestData:
description: The data object for editing a maintenance update.
properties:
attributes:
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestDataAttributes"
id:
description: The ID of the maintenance update to edit.
type: string
type:
$ref: "#/components/schemas/PatchMaintenanceUpdateRequestDataType"
required:
- type
type: object
PatchMaintenanceUpdateRequestDataAttributes:
description: Attributes for editing a maintenance update.
properties:
description:
description: The message body of the update.
example: ""
type: string
required:
- description
type: object
PatchMaintenanceUpdateRequestDataType:
default: maintenance_updates
description: Maintenance updates resource type.
enum:
- maintenance_updates
example: maintenance_updates
type: string
x-enum-varnames:
- MAINTENANCE_UPDATES
PatchNotificationRuleParameters:
description: Body of the notification rule patch request.
properties:
Expand Down Expand Up @@ -202885,6 +203047,81 @@ paths:
operator: AND
permissions:
- status_pages_incident_write
/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id}:
patch:
description: Edits the message of a specific maintenance update. This is allowed regardless of the parent maintenance's status, including completed or canceled maintenances.
operationId: PatchMaintenanceUpdate
parameters:
- description: The ID of the status page.
in: path
name: page_id
required: true
schema:
format: uuid
type: string
- description: The ID of the maintenance.
in: path
name: maintenance_id
required: true
schema:
format: uuid
type: string
- description: The ID of the maintenance update.
in: path
name: update_id
required: true
schema:
format: uuid
type: string
requestBody:
content:
application/json:
examples:
default:
value:
data:
attributes:
description: We have completed maintenance on the API to improve performance.
id: 00000000-0000-0000-0000-000000000000
type: maintenance_updates
schema:
$ref: "#/components/schemas/PatchMaintenanceUpdateRequest"
required: true
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
components_affected: []
created_at: "2026-04-27T13:37:31+00:00"
description: We have completed maintenance on the API to improve performance.
manual_transition: true
modified_at: "2026-04-27T14:37:31+00:00"
started_at: "2026-04-27T13:37:31+00:00"
status: completed
id: 00000000-0000-0000-0000-000000000000
type: maintenance_updates
schema:
$ref: "#/components/schemas/MaintenanceUpdate"
description: OK
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- status_pages_incident_write
summary: Edit maintenance update
tags:
- Status Pages
x-permission:
operator: AND
permissions:
- status_pages_incident_write
/api/v2/statuspages/{page_id}/publish:
post:
description: Publishes a status page. For pages of type `public`, makes the status page available on the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, makes the status page available under the `status-pages/$domain_prefix/view` route within the Datadog organization and requires the `status_pages_internal_page_publish` permission. The `status_pages_settings_write` permission is temporarily honored as we migrate publishing functionality from the update status page endpoint to the publish status page endpoint.
Expand Down
15 changes: 15 additions & 0 deletions examples/v2/status-pages/PatchMaintenanceUpdate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Edit maintenance update returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatusPagesAPI.new

body = DatadogAPIClient::V2::PatchMaintenanceUpdateRequest.new({
data: DatadogAPIClient::V2::PatchMaintenanceUpdateRequestData.new({
attributes: DatadogAPIClient::V2::PatchMaintenanceUpdateRequestDataAttributes.new({
description: "We have completed maintenance on the API to improve performance.",
}),
id: "00000000-0000-0000-0000-000000000000",
type: DatadogAPIClient::V2::PatchMaintenanceUpdateRequestDataType::MAINTENANCE_UPDATES,
}),
})
p api_instance.patch_maintenance_update("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
6 changes: 6 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6042,6 +6042,12 @@
"include" => "String",
"body" => "PatchMaintenanceRequest",
},
"v2.PatchMaintenanceUpdate" => {
"page_id" => "UUID",
"maintenance_id" => "UUID",
"update_id" => "UUID",
"body" => "PatchMaintenanceUpdateRequest",
},
"v2.PublishStatusPage" => {
"page_id" => "UUID",
},
Expand Down
10 changes: 10 additions & 0 deletions features/v2/status_pages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ Feature: Status Pages
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Edit maintenance update returns "OK" response
Given new "PatchMaintenanceUpdate" request
And request contains "page_id" parameter from "REPLACE.ME"
And request contains "maintenance_id" parameter from "REPLACE.ME"
And request contains "update_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "We have completed maintenance on the API to improve performance."}, "id": "00000000-0000-0000-0000-000000000000", "type": "maintenance_updates"}}
When the request is sent
Then the response status is 200 OK

@team:DataDog/incident-app
Scenario: Get component returns "OK" response
Given new "GetComponent" request
Expand Down
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -9131,6 +9131,12 @@
"type": "idempotent"
}
},
"PatchMaintenanceUpdate": {
"tag": "Status Pages",
"undo": {
"type": "idempotent"
}
},
"PublishStatusPage": {
"tag": "Status Pages",
"undo": {
Expand Down
13 changes: 13 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4928,6 +4928,15 @@ def overrides
"v2.maintenance_template_data_relationships_last_modified_by_user_data" => "MaintenanceTemplateDataRelationshipsLastModifiedByUserData",
"v2.maintenance_template_data_relationships_status_page" => "MaintenanceTemplateDataRelationshipsStatusPage",
"v2.maintenance_template_data_relationships_status_page_data" => "MaintenanceTemplateDataRelationshipsStatusPageData",
"v2.maintenance_update" => "MaintenanceUpdate",
"v2.maintenance_update_data" => "MaintenanceUpdateData",
"v2.maintenance_update_data_attributes" => "MaintenanceUpdateDataAttributes",
"v2.maintenance_update_data_attributes_status" => "MaintenanceUpdateDataAttributesStatus",
"v2.maintenance_update_data_relationships" => "MaintenanceUpdateDataRelationships",
"v2.maintenance_update_data_relationships_maintenance" => "MaintenanceUpdateDataRelationshipsMaintenance",
"v2.maintenance_update_data_relationships_maintenance_data" => "MaintenanceUpdateDataRelationshipsMaintenanceData",
"v2.maintenance_update_data_relationships_user" => "MaintenanceUpdateDataRelationshipsUser",
"v2.maintenance_update_data_relationships_user_data" => "MaintenanceUpdateDataRelationshipsUserData",
"v2.maintenance_window" => "MaintenanceWindow",
"v2.maintenance_window_attributes" => "MaintenanceWindowAttributes",
"v2.maintenance_window_create" => "MaintenanceWindowCreate",
Expand Down Expand Up @@ -5953,6 +5962,10 @@ def overrides
"v2.patch_maintenance_template_request_data" => "PatchMaintenanceTemplateRequestData",
"v2.patch_maintenance_template_request_data_attributes" => "PatchMaintenanceTemplateRequestDataAttributes",
"v2.patch_maintenance_template_request_data_type" => "PatchMaintenanceTemplateRequestDataType",
"v2.patch_maintenance_update_request" => "PatchMaintenanceUpdateRequest",
"v2.patch_maintenance_update_request_data" => "PatchMaintenanceUpdateRequestData",
"v2.patch_maintenance_update_request_data_attributes" => "PatchMaintenanceUpdateRequestDataAttributes",
"v2.patch_maintenance_update_request_data_type" => "PatchMaintenanceUpdateRequestDataType",
"v2.patch_notification_rule_parameters" => "PatchNotificationRuleParameters",
"v2.patch_notification_rule_parameters_data" => "PatchNotificationRuleParametersData",
"v2.patch_notification_rule_parameters_data_attributes" => "PatchNotificationRuleParametersDataAttributes",
Expand Down
Loading
Loading