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
264 changes: 264 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44814,6 +44814,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 @@ -76852,6 +76938,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
38 changes: 38 additions & 0 deletions examples/v2/incidents/CreateIncidentPostmortemTemplate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Create postmortem template returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentsApi;
import com.datadog.api.client.v2.model.PostmortemTemplateAttributesRequest;
import com.datadog.api.client.v2.model.PostmortemTemplateDataRequest;
import com.datadog.api.client.v2.model.PostmortemTemplateRequest;
import com.datadog.api.client.v2.model.PostmortemTemplateResponse;
import com.datadog.api.client.v2.model.PostmortemTemplateType;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createIncidentPostmortemTemplate", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

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

try {
PostmortemTemplateResponse result = apiInstance.createIncidentPostmortemTemplate(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#createIncidentPostmortemTemplate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
23 changes: 23 additions & 0 deletions examples/v2/incidents/DeleteIncidentPostmortemTemplate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Delete postmortem template returns "No Content" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentsApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteIncidentPostmortemTemplate", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

try {
apiInstance.deleteIncidentPostmortemTemplate("template-456");
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#deleteIncidentPostmortemTemplate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
25 changes: 25 additions & 0 deletions examples/v2/incidents/GetIncidentPostmortemTemplate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Get postmortem template returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentsApi;
import com.datadog.api.client.v2.model.PostmortemTemplateResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getIncidentPostmortemTemplate", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

try {
PostmortemTemplateResponse result = apiInstance.getIncidentPostmortemTemplate("template-456");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#getIncidentPostmortemTemplate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
25 changes: 25 additions & 0 deletions examples/v2/incidents/ListIncidentPostmortemTemplates.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// List postmortem templates returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentsApi;
import com.datadog.api.client.v2.model.PostmortemTemplatesResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listIncidentPostmortemTemplates", true);
IncidentsApi apiInstance = new IncidentsApi(defaultClient);

try {
PostmortemTemplatesResponse result = apiInstance.listIncidentPostmortemTemplates();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentsApi#listIncidentPostmortemTemplates");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Loading
Loading