Skip to content

Commit 3adf0ee

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2776a1d of spec repo
1 parent 0056194 commit 3adf0ee

15 files changed

Lines changed: 1746 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21602,6 +21602,82 @@ components:
2160221602
- type
2160321603
- attributes
2160421604
type: object
21605+
IncidentCreatePageAttributes:
21606+
description: Attributes for creating a page from an incident.
21607+
properties:
21608+
description:
21609+
description: Description of the page.
21610+
example: Page created for incident response
21611+
nullable: true
21612+
type: string
21613+
services:
21614+
description: List of services associated with the page.
21615+
example:
21616+
- web-service
21617+
- api-service
21618+
items:
21619+
type: string
21620+
nullable: true
21621+
type: array
21622+
tags:
21623+
description: List of tags for the page.
21624+
example:
21625+
- urgent
21626+
- production
21627+
items:
21628+
type: string
21629+
nullable: true
21630+
type: array
21631+
target:
21632+
$ref: '#/components/schemas/IncidentPageTarget'
21633+
title:
21634+
description: Title of the page.
21635+
example: Incident Response Page
21636+
type: string
21637+
required:
21638+
- title
21639+
- target
21640+
type: object
21641+
IncidentCreatePageFromIncidentData:
21642+
description: Data for creating a page from an incident.
21643+
properties:
21644+
attributes:
21645+
$ref: '#/components/schemas/IncidentCreatePageAttributes'
21646+
type:
21647+
$ref: '#/components/schemas/IncidentPageType'
21648+
required:
21649+
- type
21650+
- attributes
21651+
type: object
21652+
IncidentCreatePageFromIncidentRequest:
21653+
description: Request to create a page from an incident.
21654+
properties:
21655+
data:
21656+
$ref: '#/components/schemas/IncidentCreatePageFromIncidentData'
21657+
required:
21658+
- data
21659+
type: object
21660+
IncidentCreatePageResponse:
21661+
description: Response from creating a page from an incident.
21662+
properties:
21663+
data:
21664+
$ref: '#/components/schemas/IncidentCreatePageResponseData'
21665+
required:
21666+
- data
21667+
type: object
21668+
IncidentCreatePageResponseData:
21669+
description: Data from creating a page.
21670+
properties:
21671+
id:
21672+
description: The UUID of the created page.
21673+
example: 00000000-0000-0000-0000-000000000000
21674+
type: string
21675+
type:
21676+
$ref: '#/components/schemas/IncidentPageIdType'
21677+
required:
21678+
- id
21679+
- type
21680+
type: object
2160521681
IncidentCreateRelationships:
2160621682
description: The relationships the incident will have with other resources once
2160721683
created.
@@ -22586,6 +22662,48 @@ components:
2258622662
- id
2258722663
- type
2258822664
type: object
22665+
IncidentPageIdType:
22666+
description: Incident page ID type.
22667+
enum:
22668+
- page_uuid
22669+
example: page_uuid
22670+
type: string
22671+
x-enum-varnames:
22672+
- PAGE_UUID
22673+
IncidentPageTarget:
22674+
description: Target for creating a page from an incident.
22675+
properties:
22676+
identifier:
22677+
description: The identifier of the target (team handle, team UUID, or user
22678+
UUID).
22679+
example: team-handle
22680+
type: string
22681+
type:
22682+
$ref: '#/components/schemas/IncidentPageTargetType'
22683+
required:
22684+
- type
22685+
- identifier
22686+
type: object
22687+
IncidentPageTargetType:
22688+
description: Type of page target for incident pages.
22689+
enum:
22690+
- team_handle
22691+
- team_uuid
22692+
- user_uuid
22693+
example: team_handle
22694+
type: string
22695+
x-enum-varnames:
22696+
- TEAM_HANDLE
22697+
- TEAM_UUID
22698+
- USER_UUID
22699+
IncidentPageType:
22700+
description: Incident page type.
22701+
enum:
22702+
- page
22703+
example: page
22704+
type: string
22705+
x-enum-varnames:
22706+
- PAGE
2258922707
IncidentPostmortemType:
2259022708
default: incident_postmortems
2259122709
description: Incident postmortem resource type.
@@ -50878,6 +50996,7 @@ components:
5087850996
is not required to set downtimes.
5087950997
monitors_read: View monitors.
5088050998
monitors_write: Edit, delete, and resolve individual monitors.
50999+
oncall_page: Create and manage on-call pages.
5088151000
org_connections_read: Read cross organization connections.
5088251001
org_connections_write: Create, edit, and delete cross organization connections.
5088351002
org_management: Edit org configurations, including authentication and
@@ -59667,6 +59786,54 @@ paths:
5966759786
x-unstable: '**Note**: This endpoint is in Preview.
5966859787

5966959788
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
59789+
/api/v2/incidents/{incident_id}/page:
59790+
post:
59791+
description: Create a page from an incident.
59792+
operationId: CreatePageFromIncident
59793+
parameters:
59794+
- $ref: '#/components/parameters/IncidentIDPathParameter'
59795+
requestBody:
59796+
content:
59797+
application/json:
59798+
schema:
59799+
$ref: '#/components/schemas/IncidentCreatePageFromIncidentRequest'
59800+
description: Page creation request payload.
59801+
required: true
59802+
responses:
59803+
'200':
59804+
content:
59805+
application/json:
59806+
schema:
59807+
$ref: '#/components/schemas/IncidentCreatePageResponse'
59808+
description: OK
59809+
'400':
59810+
$ref: '#/components/responses/BadRequestResponse'
59811+
'401':
59812+
$ref: '#/components/responses/UnauthorizedResponse'
59813+
'403':
59814+
$ref: '#/components/responses/ForbiddenResponse'
59815+
'404':
59816+
$ref: '#/components/responses/NotFoundResponse'
59817+
'429':
59818+
$ref: '#/components/responses/TooManyRequestsResponse'
59819+
security:
59820+
- apiKeyAuth: []
59821+
appKeyAuth: []
59822+
- AuthZ:
59823+
- incident_read
59824+
- oncall_page
59825+
summary: Create a page from an incident
59826+
tags:
59827+
- Incidents
59828+
x-codegen-request-body-name: body
59829+
x-permission:
59830+
operator: AND
59831+
permissions:
59832+
- incident_read
59833+
- oncall_page
59834+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
59835+
59836+
contact [Datadog support](https://docs.datadoghq.com/help/).'
5967059837
/api/v2/incidents/{incident_id}/relationships/integrations:
5967159838
get:
5967259839
description: Get all integration metadata for an incident.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Create a page from an incident returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.IncidentsApi;
6+
import com.datadog.api.client.v2.model.IncidentCreatePageAttributes;
7+
import com.datadog.api.client.v2.model.IncidentCreatePageFromIncidentData;
8+
import com.datadog.api.client.v2.model.IncidentCreatePageFromIncidentRequest;
9+
import com.datadog.api.client.v2.model.IncidentCreatePageResponse;
10+
import com.datadog.api.client.v2.model.IncidentPageTarget;
11+
import com.datadog.api.client.v2.model.IncidentPageTargetType;
12+
import com.datadog.api.client.v2.model.IncidentPageType;
13+
import java.util.Arrays;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
defaultClient.setUnstableOperationEnabled("v2.createPageFromIncident", true);
19+
IncidentsApi apiInstance = new IncidentsApi(defaultClient);
20+
21+
IncidentCreatePageFromIncidentRequest body =
22+
new IncidentCreatePageFromIncidentRequest()
23+
.data(
24+
new IncidentCreatePageFromIncidentData()
25+
.attributes(
26+
new IncidentCreatePageAttributes()
27+
.description("Page created for incident response")
28+
.services(Arrays.asList("web-service", "api-service"))
29+
.tags(Arrays.asList("urgent", "production"))
30+
.target(
31+
new IncidentPageTarget()
32+
.identifier("team-handle")
33+
.type(IncidentPageTargetType.TEAM_HANDLE))
34+
.title("Incident Response Page"))
35+
.type(IncidentPageType.PAGE));
36+
37+
try {
38+
IncidentCreatePageResponse result = apiInstance.createPageFromIncident("incident_id", body);
39+
System.out.println(result);
40+
} catch (ApiException e) {
41+
System.err.println("Exception when calling IncidentsApi#createPageFromIncident");
42+
System.err.println("Status code: " + e.getCode());
43+
System.err.println("Reason: " + e.getResponseBody());
44+
System.err.println("Response headers: " + e.getResponseHeaders());
45+
e.printStackTrace();
46+
}
47+
}
48+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ public class ApiClient {
725725
put("v2.createIncidentNotificationTemplate", false);
726726
put("v2.createIncidentTodo", false);
727727
put("v2.createIncidentType", false);
728+
put("v2.createPageFromIncident", false);
728729
put("v2.deleteIncident", false);
729730
put("v2.deleteIncidentImpact", false);
730731
put("v2.deleteIncidentIntegration", false);

0 commit comments

Comments
 (0)