Skip to content

Commit fbad6b9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2776a1d of spec repo
1 parent 358a4b3 commit fbad6b9

17 files changed

+1269
-0
lines changed

.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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Create a page from an incident returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_page_from_incident".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::IncidentCreatePageFromIncidentRequest.new({
10+
data: DatadogAPIClient::V2::IncidentCreatePageFromIncidentData.new({
11+
attributes: DatadogAPIClient::V2::IncidentCreatePageAttributes.new({
12+
description: "Page created for incident response",
13+
services: [
14+
"web-service",
15+
"api-service",
16+
],
17+
tags: [
18+
"urgent",
19+
"production",
20+
],
21+
target: DatadogAPIClient::V2::IncidentPageTarget.new({
22+
identifier: "team-handle",
23+
type: DatadogAPIClient::V2::IncidentPageTargetType::TEAM_HANDLE,
24+
}),
25+
title: "Incident Response Page",
26+
}),
27+
type: DatadogAPIClient::V2::IncidentPageType::PAGE,
28+
}),
29+
})
30+
p api_instance.create_page_from_incident("incident_id", body)

features/scenarios_model_mapping.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,10 @@
19441944
"incident_id" => "String",
19451945
"impact_id" => "String",
19461946
},
1947+
"v2.CreatePageFromIncident" => {
1948+
"incident_id" => "String",
1949+
"body" => "IncidentCreatePageFromIncidentRequest",
1950+
},
19471951
"v2.ListIncidentIntegrations" => {
19481952
"incident_id" => "String",
19491953
},

features/v2/incidents.feature

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,33 @@ Feature: Incidents
2121
When the request is sent
2222
Then the response status is 200 OK
2323

24+
@generated @skip @team:DataDog/incident-app
25+
Scenario: Create a page from an incident returns "Bad Request" response
26+
Given operation "CreatePageFromIncident" enabled
27+
And new "CreatePageFromIncident" request
28+
And request contains "incident_id" parameter from "REPLACE.ME"
29+
And body with value {"data": {"attributes": {"description": "Page created for incident response", "services": ["web-service", "api-service"], "tags": ["urgent", "production"], "target": {"identifier": "team-handle", "type": "team_handle"}, "title": "Incident Response Page"}, "type": "page"}}
30+
When the request is sent
31+
Then the response status is 400 Bad Request
32+
33+
@generated @skip @team:DataDog/incident-app
34+
Scenario: Create a page from an incident returns "Not Found" response
35+
Given operation "CreatePageFromIncident" enabled
36+
And new "CreatePageFromIncident" request
37+
And request contains "incident_id" parameter from "REPLACE.ME"
38+
And body with value {"data": {"attributes": {"description": "Page created for incident response", "services": ["web-service", "api-service"], "tags": ["urgent", "production"], "target": {"identifier": "team-handle", "type": "team_handle"}, "title": "Incident Response Page"}, "type": "page"}}
39+
When the request is sent
40+
Then the response status is 404 Not Found
41+
42+
@generated @skip @team:DataDog/incident-app
43+
Scenario: Create a page from an incident returns "OK" response
44+
Given operation "CreatePageFromIncident" enabled
45+
And new "CreatePageFromIncident" request
46+
And request contains "incident_id" parameter from "REPLACE.ME"
47+
And body with value {"data": {"attributes": {"description": "Page created for incident response", "services": ["web-service", "api-service"], "tags": ["urgent", "production"], "target": {"identifier": "team-handle", "type": "team_handle"}, "title": "Incident Response Page"}, "type": "page"}}
48+
When the request is sent
49+
Then the response status is 200 OK
50+
2451
@team:DataDog/incident-app
2552
Scenario: Create an incident attachment returns "OK" response
2653
Given operation "UpdateIncidentAttachments" enabled

features/v2/undo.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,13 @@
14231423
"type": "idempotent"
14241424
}
14251425
},
1426+
"CreatePageFromIncident": {
1427+
"tag": "Incidents",
1428+
"undo": {
1429+
"parameters": [],
1430+
"type": "unsafe"
1431+
}
1432+
},
14261433
"ListIncidentIntegrations": {
14271434
"tag": "Incidents",
14281435
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def initialize
227227
"v2.create_incident_notification_template": false,
228228
"v2.create_incident_todo": false,
229229
"v2.create_incident_type": false,
230+
"v2.create_page_from_incident": false,
230231
"v2.delete_incident": false,
231232
"v2.delete_incident_impact": false,
232233
"v2.delete_incident_integration": false,

lib/datadog_api_client/inflector.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,6 +2223,11 @@ def overrides
22232223
"v2.incident_attachment_update_response" => "IncidentAttachmentUpdateResponse",
22242224
"v2.incident_create_attributes" => "IncidentCreateAttributes",
22252225
"v2.incident_create_data" => "IncidentCreateData",
2226+
"v2.incident_create_page_attributes" => "IncidentCreatePageAttributes",
2227+
"v2.incident_create_page_from_incident_data" => "IncidentCreatePageFromIncidentData",
2228+
"v2.incident_create_page_from_incident_request" => "IncidentCreatePageFromIncidentRequest",
2229+
"v2.incident_create_page_response" => "IncidentCreatePageResponse",
2230+
"v2.incident_create_page_response_data" => "IncidentCreatePageResponseData",
22262231
"v2.incident_create_relationships" => "IncidentCreateRelationships",
22272232
"v2.incident_create_request" => "IncidentCreateRequest",
22282233
"v2.incident_field_attributes" => "IncidentFieldAttributes",
@@ -2286,6 +2291,10 @@ def overrides
22862291
"v2.incident_notification_template_type" => "IncidentNotificationTemplateType",
22872292
"v2.incident_notification_template_update_attributes" => "IncidentNotificationTemplateUpdateAttributes",
22882293
"v2.incident_notification_template_update_data" => "IncidentNotificationTemplateUpdateData",
2294+
"v2.incident_page_id_type" => "IncidentPageIdType",
2295+
"v2.incident_page_target" => "IncidentPageTarget",
2296+
"v2.incident_page_target_type" => "IncidentPageTargetType",
2297+
"v2.incident_page_type" => "IncidentPageType",
22892298
"v2.incident_postmortem_type" => "IncidentPostmortemType",
22902299
"v2.incident_related_object" => "IncidentRelatedObject",
22912300
"v2.incident_responders_type" => "IncidentRespondersType",

0 commit comments

Comments
 (0)