Skip to content

Commit 4ee31d8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 15dbc5e of spec repo
1 parent 5fd76fd commit 4ee31d8

18 files changed

+2572
-26
lines changed

.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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Create incident rule returns "Created" 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.IncidentRuleAttributesRequest;
7+
import com.datadog.api.client.v2.model.IncidentRuleDataRequest;
8+
import com.datadog.api.client.v2.model.IncidentRuleRequest;
9+
import com.datadog.api.client.v2.model.IncidentRuleResponse;
10+
import com.datadog.api.client.v2.model.IncidentRuleType;
11+
12+
public class Example {
13+
public static void main(String[] args) {
14+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15+
defaultClient.setUnstableOperationEnabled("v2.createIncidentConfigRule", true);
16+
IncidentsApi apiInstance = new IncidentsApi(defaultClient);
17+
18+
IncidentRuleRequest body =
19+
new IncidentRuleRequest()
20+
.data(
21+
new IncidentRuleDataRequest()
22+
.attributes(new IncidentRuleAttributesRequest().name("High Severity Rule"))
23+
.type(IncidentRuleType.INCIDENT_RULE));
24+
25+
try {
26+
IncidentRuleResponse result = apiInstance.createIncidentConfigRule(body);
27+
System.out.println(result);
28+
} catch (ApiException e) {
29+
System.err.println("Exception when calling IncidentsApi#createIncidentConfigRule");
30+
System.err.println("Status code: " + e.getCode());
31+
System.err.println("Reason: " + e.getResponseBody());
32+
System.err.println("Response headers: " + e.getResponseHeaders());
33+
e.printStackTrace();
34+
}
35+
}
36+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Delete incident rule returns "No Content" 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+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.deleteIncidentConfigRule", true);
11+
IncidentsApi apiInstance = new IncidentsApi(defaultClient);
12+
13+
try {
14+
apiInstance.deleteIncidentConfigRule("612e0c88-9137-4bd2-8de4-9356867d4c6a");
15+
} catch (ApiException e) {
16+
System.err.println("Exception when calling IncidentsApi#deleteIncidentConfigRule");
17+
System.err.println("Status code: " + e.getCode());
18+
System.err.println("Reason: " + e.getResponseBody());
19+
System.err.println("Response headers: " + e.getResponseHeaders());
20+
e.printStackTrace();
21+
}
22+
}
23+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Get incident rule 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.IncidentRuleResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getIncidentConfigRule", true);
12+
IncidentsApi apiInstance = new IncidentsApi(defaultClient);
13+
14+
try {
15+
IncidentRuleResponse result =
16+
apiInstance.getIncidentConfigRule("612e0c88-9137-4bd2-8de4-9356867d4c6a");
17+
System.out.println(result);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling IncidentsApi#getIncidentConfigRule");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// List incident rules 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.IncidentRulesResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.listIncidentConfigRules", true);
12+
IncidentsApi apiInstance = new IncidentsApi(defaultClient);
13+
14+
try {
15+
IncidentRulesResponse result = apiInstance.listIncidentConfigRules();
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling IncidentsApi#listIncidentConfigRules");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)