Skip to content

Commit 208f3ab

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fc84b0c of spec repo
1 parent 364c410 commit 208f3ab

20 files changed

Lines changed: 1837 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29120,6 +29120,92 @@ components:
2912029120
user_defined_fields:
2912129121
$ref: '#/components/schemas/RelationshipToIncidentUserDefinedFields'
2912229122
type: object
29123+
IncidentRuleAttributesRequest:
29124+
properties:
29125+
name:
29126+
description: The name of the rule
29127+
example: High Severity Rule
29128+
type: string
29129+
required:
29130+
- name
29131+
type: object
29132+
IncidentRuleAttributesResponse:
29133+
properties:
29134+
createdAt:
29135+
description: When the rule was created
29136+
example: '2026-01-13T17:15:53.208340Z'
29137+
format: date-time
29138+
type: string
29139+
modifiedAt:
29140+
description: When the rule was last modified
29141+
example: '2026-01-13T17:15:53.208340Z'
29142+
format: date-time
29143+
type: string
29144+
name:
29145+
description: The name of the rule
29146+
example: High Severity Rule
29147+
type: string
29148+
required:
29149+
- name
29150+
- createdAt
29151+
- modifiedAt
29152+
type: object
29153+
IncidentRuleDataRequest:
29154+
properties:
29155+
attributes:
29156+
$ref: '#/components/schemas/IncidentRuleAttributesRequest'
29157+
type:
29158+
$ref: '#/components/schemas/IncidentRuleType'
29159+
required:
29160+
- type
29161+
- attributes
29162+
type: object
29163+
IncidentRuleDataResponse:
29164+
properties:
29165+
attributes:
29166+
$ref: '#/components/schemas/IncidentRuleAttributesResponse'
29167+
id:
29168+
description: The ID of the rule
29169+
example: 612e0c88-9137-4bd2-8de4-9356867d4c6a
29170+
type: string
29171+
type:
29172+
$ref: '#/components/schemas/IncidentRuleType'
29173+
required:
29174+
- id
29175+
- type
29176+
- attributes
29177+
type: object
29178+
IncidentRuleRequest:
29179+
properties:
29180+
data:
29181+
$ref: '#/components/schemas/IncidentRuleDataRequest'
29182+
required:
29183+
- data
29184+
type: object
29185+
IncidentRuleResponse:
29186+
properties:
29187+
data:
29188+
$ref: '#/components/schemas/IncidentRuleDataResponse'
29189+
required:
29190+
- data
29191+
type: object
29192+
IncidentRuleType:
29193+
description: Incident rule resource type
29194+
enum:
29195+
- incident_rule
29196+
example: incident_rule
29197+
type: string
29198+
x-enum-varnames:
29199+
- INCIDENT_RULE
29200+
IncidentRulesResponse:
29201+
properties:
29202+
data:
29203+
items:
29204+
$ref: '#/components/schemas/IncidentRuleDataResponse'
29205+
type: array
29206+
required:
29207+
- data
29208+
type: object
2912329209
IncidentSearchResponse:
2912429210
description: Response with incidents and facets.
2912529211
properties:
@@ -75865,6 +75951,178 @@ paths:
7586575951
- incident_notification_settings_write
7586675952
x-unstable: '**Note**: This endpoint is in Preview.
7586775953

75954+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
75955+
/api/v2/incidents/config/rules:
75956+
get:
75957+
description: Retrieve a list of all incident rules for the organization.
75958+
operationId: ListIncidentConfigRules
75959+
responses:
75960+
'200':
75961+
content:
75962+
application/json:
75963+
schema:
75964+
$ref: '#/components/schemas/IncidentRulesResponse'
75965+
description: OK
75966+
'400':
75967+
content:
75968+
application/json:
75969+
schema:
75970+
$ref: '#/components/schemas/JSONAPIErrorResponse'
75971+
description: Bad Request
75972+
'429':
75973+
$ref: '#/components/responses/TooManyRequestsResponse'
75974+
summary: List incident rules
75975+
tags:
75976+
- Incidents
75977+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
75978+
75979+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
75980+
post:
75981+
description: Create a new incident rule for the organization.
75982+
operationId: CreateIncidentConfigRule
75983+
requestBody:
75984+
content:
75985+
application/json:
75986+
schema:
75987+
$ref: '#/components/schemas/IncidentRuleRequest'
75988+
required: true
75989+
responses:
75990+
'201':
75991+
content:
75992+
application/json:
75993+
schema:
75994+
$ref: '#/components/schemas/IncidentRuleResponse'
75995+
description: Created
75996+
'400':
75997+
content:
75998+
application/json:
75999+
schema:
76000+
$ref: '#/components/schemas/JSONAPIErrorResponse'
76001+
description: Bad Request
76002+
'429':
76003+
$ref: '#/components/responses/TooManyRequestsResponse'
76004+
summary: Create incident rule
76005+
tags:
76006+
- Incidents
76007+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
76008+
76009+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
76010+
/api/v2/incidents/config/rules/{rule_id}:
76011+
delete:
76012+
description: Delete an incident rule.
76013+
operationId: DeleteIncidentConfigRule
76014+
parameters:
76015+
- description: The ID of the incident rule
76016+
in: path
76017+
name: rule_id
76018+
required: true
76019+
schema:
76020+
example: 612e0c88-9137-4bd2-8de4-9356867d4c6a
76021+
type: string
76022+
responses:
76023+
'204':
76024+
description: No Content
76025+
'400':
76026+
content:
76027+
application/json:
76028+
schema:
76029+
$ref: '#/components/schemas/JSONAPIErrorResponse'
76030+
description: Bad Request
76031+
'404':
76032+
content:
76033+
application/json:
76034+
schema:
76035+
$ref: '#/components/schemas/JSONAPIErrorResponse'
76036+
description: Not Found
76037+
'429':
76038+
$ref: '#/components/responses/TooManyRequestsResponse'
76039+
summary: Delete incident rule
76040+
tags:
76041+
- Incidents
76042+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
76043+
76044+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
76045+
get:
76046+
description: Retrieve details of a specific incident rule.
76047+
operationId: GetIncidentConfigRule
76048+
parameters:
76049+
- description: The ID of the incident rule
76050+
in: path
76051+
name: rule_id
76052+
required: true
76053+
schema:
76054+
example: 612e0c88-9137-4bd2-8de4-9356867d4c6a
76055+
type: string
76056+
responses:
76057+
'200':
76058+
content:
76059+
application/json:
76060+
schema:
76061+
$ref: '#/components/schemas/IncidentRuleResponse'
76062+
description: OK
76063+
'400':
76064+
content:
76065+
application/json:
76066+
schema:
76067+
$ref: '#/components/schemas/JSONAPIErrorResponse'
76068+
description: Bad Request
76069+
'404':
76070+
content:
76071+
application/json:
76072+
schema:
76073+
$ref: '#/components/schemas/JSONAPIErrorResponse'
76074+
description: Not Found
76075+
'429':
76076+
$ref: '#/components/responses/TooManyRequestsResponse'
76077+
summary: Get incident rule
76078+
tags:
76079+
- Incidents
76080+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
76081+
76082+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
76083+
patch:
76084+
description: Update an existing incident rule.
76085+
operationId: UpdateIncidentConfigRule
76086+
parameters:
76087+
- description: The ID of the incident rule
76088+
in: path
76089+
name: rule_id
76090+
required: true
76091+
schema:
76092+
example: 612e0c88-9137-4bd2-8de4-9356867d4c6a
76093+
type: string
76094+
requestBody:
76095+
content:
76096+
application/json:
76097+
schema:
76098+
$ref: '#/components/schemas/IncidentRuleRequest'
76099+
required: true
76100+
responses:
76101+
'200':
76102+
content:
76103+
application/json:
76104+
schema:
76105+
$ref: '#/components/schemas/IncidentRuleResponse'
76106+
description: OK
76107+
'400':
76108+
content:
76109+
application/json:
76110+
schema:
76111+
$ref: '#/components/schemas/JSONAPIErrorResponse'
76112+
description: Bad Request
76113+
'404':
76114+
content:
76115+
application/json:
76116+
schema:
76117+
$ref: '#/components/schemas/JSONAPIErrorResponse'
76118+
description: Not Found
76119+
'429':
76120+
$ref: '#/components/responses/TooManyRequestsResponse'
76121+
summary: Update incident rule
76122+
tags:
76123+
- Incidents
76124+
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.
76125+
7586876126
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
7586976127
/api/v2/incidents/config/types:
7587076128
get:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Create incident rule returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_incident_config_rule".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::IncidentRuleRequest.new({
10+
data: DatadogAPIClient::V2::IncidentRuleDataRequest.new({
11+
attributes: DatadogAPIClient::V2::IncidentRuleAttributesRequest.new({
12+
name: "High Severity Rule",
13+
}),
14+
type: DatadogAPIClient::V2::IncidentRuleType::INCIDENT_RULE,
15+
}),
16+
})
17+
p api_instance.create_incident_config_rule(body)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Delete incident rule returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_incident_config_rule".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
api_instance.delete_incident_config_rule("612e0c88-9137-4bd2-8de4-9356867d4c6a")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get incident rule returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_incident_config_rule".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
p api_instance.get_incident_config_rule("612e0c88-9137-4bd2-8de4-9356867d4c6a")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List incident rules returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_incident_config_rules".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
p api_instance.list_incident_config_rules()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Update incident rule returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_incident_config_rule".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::IncidentRuleRequest.new({
10+
data: DatadogAPIClient::V2::IncidentRuleDataRequest.new({
11+
attributes: DatadogAPIClient::V2::IncidentRuleAttributesRequest.new({
12+
name: "High Severity Rule",
13+
}),
14+
type: DatadogAPIClient::V2::IncidentRuleType::INCIDENT_RULE,
15+
}),
16+
})
17+
p api_instance.update_incident_config_rule("612e0c88-9137-4bd2-8de4-9356867d4c6a", body)

features/scenarios_model_mapping.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,6 +2121,19 @@
21212121
"include" => "String",
21222122
"body" => "PatchIncidentNotificationTemplateRequest",
21232123
},
2124+
"v2.CreateIncidentConfigRule" => {
2125+
"body" => "IncidentRuleRequest",
2126+
},
2127+
"v2.DeleteIncidentConfigRule" => {
2128+
"rule_id" => "String",
2129+
},
2130+
"v2.GetIncidentConfigRule" => {
2131+
"rule_id" => "String",
2132+
},
2133+
"v2.UpdateIncidentConfigRule" => {
2134+
"rule_id" => "String",
2135+
"body" => "IncidentRuleRequest",
2136+
},
21242137
"v2.ListIncidentTypes" => {
21252138
"include_deleted" => "Boolean",
21262139
},

0 commit comments

Comments
 (0)