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
56 changes: 56 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19646,6 +19646,62 @@ datadog\_api\_client.v2.model.postmortem\_cell\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_attributes\_request module
------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_template_attributes_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_attributes\_response module
-------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_template_attributes_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_data\_request module
------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_template_data_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_data\_response module
-------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_template_data_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_request module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_template_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_response module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_template_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_template\_type module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_template_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.postmortem\_templates\_response module
--------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.postmortem_templates_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.powerpack module
----------------------------------------------

Expand Down
27 changes: 27 additions & 0 deletions examples/v2/incidents/CreateIncidentPostmortemTemplate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
Create postmortem template returns "Created" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.incidents_api import IncidentsApi
from datadog_api_client.v2.model.postmortem_template_attributes_request import PostmortemTemplateAttributesRequest
from datadog_api_client.v2.model.postmortem_template_data_request import PostmortemTemplateDataRequest
from datadog_api_client.v2.model.postmortem_template_request import PostmortemTemplateRequest
from datadog_api_client.v2.model.postmortem_template_type import PostmortemTemplateType

body = PostmortemTemplateRequest(
data=PostmortemTemplateDataRequest(
attributes=PostmortemTemplateAttributesRequest(
name="Standard Postmortem Template",
),
type=PostmortemTemplateType.POSTMORTEM_TEMPLATE,
),
)

configuration = Configuration()
configuration.unstable_operations["create_incident_postmortem_template"] = True
with ApiClient(configuration) as api_client:
api_instance = IncidentsApi(api_client)
response = api_instance.create_incident_postmortem_template(body=body)

print(response)
14 changes: 14 additions & 0 deletions examples/v2/incidents/DeleteIncidentPostmortemTemplate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Delete postmortem template returns "No Content" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.incidents_api import IncidentsApi

configuration = Configuration()
configuration.unstable_operations["delete_incident_postmortem_template"] = True
with ApiClient(configuration) as api_client:
api_instance = IncidentsApi(api_client)
api_instance.delete_incident_postmortem_template(
template_id="template-456",
)
Loading