Skip to content
Merged
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
264 changes: 264 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45141,6 +45141,92 @@ components:
type: string
x-enum-varnames:
- MARKDOWN
PostmortemTemplateAttributesRequest:
properties:
name:
description: The name of the template
example: Standard Postmortem Template
type: string
required:
- name
type: object
PostmortemTemplateAttributesResponse:
properties:
createdAt:
description: When the template was created
example: '2026-01-13T17:15:53.208340Z'
format: date-time
type: string
modifiedAt:
description: When the template was last modified
example: '2026-01-13T17:15:53.208340Z'
format: date-time
type: string
name:
description: The name of the template
example: Standard Postmortem Template
type: string
required:
- name
- createdAt
- modifiedAt
type: object
PostmortemTemplateDataRequest:
properties:
attributes:
$ref: '#/components/schemas/PostmortemTemplateAttributesRequest'
type:
$ref: '#/components/schemas/PostmortemTemplateType'
required:
- type
- attributes
type: object
PostmortemTemplateDataResponse:
properties:
attributes:
$ref: '#/components/schemas/PostmortemTemplateAttributesResponse'
id:
description: The ID of the template
example: template-456
type: string
type:
$ref: '#/components/schemas/PostmortemTemplateType'
required:
- id
- type
- attributes
type: object
PostmortemTemplateRequest:
properties:
data:
$ref: '#/components/schemas/PostmortemTemplateDataRequest'
required:
- data
type: object
PostmortemTemplateResponse:
properties:
data:
$ref: '#/components/schemas/PostmortemTemplateDataResponse'
required:
- data
type: object
PostmortemTemplateType:
description: Postmortem template resource type
enum:
- postmortem_template
example: postmortem_template
type: string
x-enum-varnames:
- POSTMORTEM_TEMPLATE
PostmortemTemplatesResponse:
properties:
data:
items:
$ref: '#/components/schemas/PostmortemTemplateDataResponse'
type: array
required:
- data
type: object
Powerpack:
description: Powerpacks are templated groups of dashboard widgets you can save
from an existing dashboard and turn into reusable packs in the widget tray.
Expand Down Expand Up @@ -78136,6 +78222,184 @@ paths:
- incident_notification_settings_write
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents/config/postmortem-templates:
get:
description: Retrieve a list of all postmortem templates for incidents.
operationId: ListIncidentPostmortemTemplates
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PostmortemTemplatesResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: List postmortem templates
tags:
- Incidents
x-unstable: '**Note**: This endpoint is in preview and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: Create a new postmortem template for incidents.
operationId: CreateIncidentPostmortemTemplate
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostmortemTemplateRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/PostmortemTemplateResponse'
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Create postmortem template
tags:
- Incidents
x-unstable: '**Note**: This endpoint is in preview and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents/config/postmortem-templates/{template_id}:
delete:
description: Delete a postmortem template.
operationId: DeleteIncidentPostmortemTemplate
parameters:
- description: The ID of the postmortem template
in: path
name: template_id
required: true
schema:
example: template-456
type: string
responses:
'204':
description: No Content
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Delete postmortem template
tags:
- Incidents
x-unstable: '**Note**: This endpoint is in preview and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
get:
description: Retrieve details of a specific postmortem template.
operationId: GetIncidentPostmortemTemplate
parameters:
- description: The ID of the postmortem template
in: path
name: template_id
required: true
schema:
example: template-456
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PostmortemTemplateResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get postmortem template
tags:
- Incidents
x-unstable: '**Note**: This endpoint is in preview and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
patch:
description: Update an existing postmortem template.
operationId: UpdateIncidentPostmortemTemplate
parameters:
- description: The ID of the postmortem template
in: path
name: template_id
required: true
schema:
example: template-456
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PostmortemTemplateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PostmortemTemplateResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Update postmortem template
tags:
- Incidents
x-unstable: '**Note**: This endpoint is in preview and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/incidents/config/types:
get:
Expand Down
17 changes: 17 additions & 0 deletions examples/v2/incidents/CreateIncidentPostmortemTemplate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Create postmortem template returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_incident_postmortem_template".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::PostmortemTemplateRequest.new({
data: DatadogAPIClient::V2::PostmortemTemplateDataRequest.new({
attributes: DatadogAPIClient::V2::PostmortemTemplateAttributesRequest.new({
name: "Standard Postmortem Template",
}),
type: DatadogAPIClient::V2::PostmortemTemplateType::POSTMORTEM_TEMPLATE,
}),
})
p api_instance.create_incident_postmortem_template(body)
8 changes: 8 additions & 0 deletions examples/v2/incidents/DeleteIncidentPostmortemTemplate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete postmortem template returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_incident_postmortem_template".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
api_instance.delete_incident_postmortem_template("template-456")
8 changes: 8 additions & 0 deletions examples/v2/incidents/GetIncidentPostmortemTemplate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get postmortem template returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_incident_postmortem_template".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
p api_instance.get_incident_postmortem_template("template-456")
8 changes: 8 additions & 0 deletions examples/v2/incidents/ListIncidentPostmortemTemplates.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List postmortem templates returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_incident_postmortem_templates".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
p api_instance.list_incident_postmortem_templates()
17 changes: 17 additions & 0 deletions examples/v2/incidents/UpdateIncidentPostmortemTemplate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Update postmortem template returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_incident_postmortem_template".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::PostmortemTemplateRequest.new({
data: DatadogAPIClient::V2::PostmortemTemplateDataRequest.new({
attributes: DatadogAPIClient::V2::PostmortemTemplateAttributesRequest.new({
name: "Standard Postmortem Template",
}),
type: DatadogAPIClient::V2::PostmortemTemplateType::POSTMORTEM_TEMPLATE,
}),
})
p api_instance.update_incident_postmortem_template("template-456", body)
13 changes: 13 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2151,6 +2151,19 @@
"include" => "String",
"body" => "PatchIncidentNotificationTemplateRequest",
},
"v2.CreateIncidentPostmortemTemplate" => {
"body" => "PostmortemTemplateRequest",
},
"v2.DeleteIncidentPostmortemTemplate" => {
"template_id" => "String",
},
"v2.GetIncidentPostmortemTemplate" => {
"template_id" => "String",
},
"v2.UpdateIncidentPostmortemTemplate" => {
"template_id" => "String",
"body" => "PostmortemTemplateRequest",
},
"v2.ListIncidentTypes" => {
"include_deleted" => "Boolean",
},
Expand Down
Loading
Loading