Skip to content

Commit da50b19

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c0a649d of spec repo
1 parent 89c57b3 commit da50b19

35 files changed

Lines changed: 2695 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 523 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Get a Bits AI investigation returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getInvestigation"] = true;
9+
const apiInstance = new v2.BitsAIApi(configuration);
10+
11+
const params: v2.BitsAIApiGetInvestigationRequest = {
12+
id: "id",
13+
};
14+
15+
apiInstance
16+
.getInvestigation(params)
17+
.then((data: v2.GetInvestigationResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* List Bits AI investigations returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listInvestigations"] = true;
9+
const apiInstance = new v2.BitsAIApi(configuration);
10+
11+
apiInstance
12+
.listInvestigations()
13+
.then((data: v2.ListInvestigationsResponse) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.catch((error: any) => console.error(error));
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* List Bits AI investigations returns "OK" response with pagination
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listInvestigations"] = true;
9+
const apiInstance = new v2.BitsAIApi(configuration);
10+
11+
(async () => {
12+
try {
13+
for await (const item of apiInstance.listInvestigationsWithPagination()) {
14+
console.log(item);
15+
}
16+
} catch (error) {
17+
console.error(error);
18+
}
19+
})();
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/**
2+
* Trigger a Bits AI investigation returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.triggerInvestigation"] = true;
9+
const apiInstance = new v2.BitsAIApi(configuration);
10+
11+
const params: v2.BitsAIApiTriggerInvestigationRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
trigger: {
16+
monitorAlertTrigger: {
17+
eventId: "1234567890123456789",
18+
eventTs: 1700000000000,
19+
monitorId: 12345678,
20+
},
21+
type: "monitor_alert_trigger",
22+
},
23+
},
24+
type: "trigger_investigation_request",
25+
},
26+
},
27+
};
28+
29+
apiInstance
30+
.triggerInvestigation(params)
31+
.then((data: v2.TriggerInvestigationResponse) => {
32+
console.log(
33+
"API called successfully. Returned data: " + JSON.stringify(data)
34+
);
35+
})
36+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3292,6 +3292,35 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
32923292
},
32933293
"operationResponseType": "AuthNMappingResponse",
32943294
},
3295+
"v2.ListInvestigations": {
3296+
"pageOffset": {
3297+
"type": "number",
3298+
"format": "int64",
3299+
},
3300+
"pageLimit": {
3301+
"type": "number",
3302+
"format": "int64",
3303+
},
3304+
"filterMonitorId": {
3305+
"type": "number",
3306+
"format": "int64",
3307+
},
3308+
"operationResponseType": "ListInvestigationsResponse",
3309+
},
3310+
"v2.TriggerInvestigation": {
3311+
"body": {
3312+
"type": "TriggerInvestigationRequest",
3313+
"format": "",
3314+
},
3315+
"operationResponseType": "TriggerInvestigationResponse",
3316+
},
3317+
"v2.GetInvestigation": {
3318+
"id": {
3319+
"type": "string",
3320+
"format": "",
3321+
},
3322+
"operationResponseType": "GetInvestigationResponse",
3323+
},
32953324
"v2.SearchCases": {
32963325
"pageSize": {
32973326
"type": "number",

features/v2/bits_ai.feature

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@endpoint(bits-ai) @endpoint(bits-ai-v2)
2+
Feature: Bits AI
3+
Use the Bits AI endpoints to retrieve AI-powered investigations.
4+
5+
Background:
6+
Given a valid "apiKeyAuth" key in the system
7+
And a valid "appKeyAuth" key in the system
8+
And an instance of "BitsAI" API
9+
10+
@generated @skip @team:DataDog/bits-ai
11+
Scenario: Get a Bits AI investigation returns "Bad Request" response
12+
Given operation "GetInvestigation" enabled
13+
And new "GetInvestigation" request
14+
And request contains "id" parameter from "REPLACE.ME"
15+
When the request is sent
16+
Then the response status is 400 Bad Request
17+
18+
@generated @skip @team:DataDog/bits-ai
19+
Scenario: Get a Bits AI investigation returns "Not Found" response
20+
Given operation "GetInvestigation" enabled
21+
And new "GetInvestigation" request
22+
And request contains "id" parameter from "REPLACE.ME"
23+
When the request is sent
24+
Then the response status is 404 Not Found
25+
26+
@generated @skip @team:DataDog/bits-ai
27+
Scenario: Get a Bits AI investigation returns "OK" response
28+
Given operation "GetInvestigation" enabled
29+
And new "GetInvestigation" request
30+
And request contains "id" parameter from "REPLACE.ME"
31+
When the request is sent
32+
Then the response status is 200 OK
33+
34+
@generated @skip @team:DataDog/bits-ai
35+
Scenario: List Bits AI investigations returns "Bad Request" response
36+
Given operation "ListInvestigations" enabled
37+
And new "ListInvestigations" request
38+
When the request is sent
39+
Then the response status is 400 Bad Request
40+
41+
@generated @skip @team:DataDog/bits-ai
42+
Scenario: List Bits AI investigations returns "OK" response
43+
Given operation "ListInvestigations" enabled
44+
And new "ListInvestigations" request
45+
When the request is sent
46+
Then the response status is 200 OK
47+
48+
@generated @skip @team:DataDog/bits-ai @with-pagination
49+
Scenario: List Bits AI investigations returns "OK" response with pagination
50+
Given operation "ListInvestigations" enabled
51+
And new "ListInvestigations" request
52+
When the request with pagination is sent
53+
Then the response status is 200 OK
54+
55+
@generated @skip @team:DataDog/bits-ai
56+
Scenario: Trigger a Bits AI investigation returns "Bad Request" response
57+
Given operation "TriggerInvestigation" enabled
58+
And new "TriggerInvestigation" request
59+
And body with value {"data": {"attributes": {"trigger": {"monitor_alert_trigger": {"event_id": "1234567890123456789", "event_ts": 1700000000000, "monitor_id": 12345678}, "type": "monitor_alert_trigger"}}, "type": "trigger_investigation_request"}}
60+
When the request is sent
61+
Then the response status is 400 Bad Request
62+
63+
@generated @skip @team:DataDog/bits-ai
64+
Scenario: Trigger a Bits AI investigation returns "OK" response
65+
Given operation "TriggerInvestigation" enabled
66+
And new "TriggerInvestigation" request
67+
And body with value {"data": {"attributes": {"trigger": {"monitor_alert_trigger": {"event_id": "1234567890123456789", "event_ts": 1700000000000, "monitor_id": 12345678}, "type": "monitor_alert_trigger"}}, "type": "trigger_investigation_request"}}
68+
When the request is sent
69+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,24 @@
650650
"type": "idempotent"
651651
}
652652
},
653+
"ListInvestigations": {
654+
"tag": "Bits AI",
655+
"undo": {
656+
"type": "safe"
657+
}
658+
},
659+
"TriggerInvestigation": {
660+
"tag": "Bits AI",
661+
"undo": {
662+
"type": "unsafe"
663+
}
664+
},
665+
"GetInvestigation": {
666+
"tag": "Bits AI",
667+
"undo": {
668+
"type": "safe"
669+
}
670+
},
653671
"SearchCases": {
654672
"tag": "Case Management",
655673
"undo": {

packages/datadog-api-client-common/configuration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ export function createConfiguration(
241241
"v2.getOpenAPI": false,
242242
"v2.listAPIs": false,
243243
"v2.updateOpenAPI": false,
244+
"v2.getInvestigation": false,
245+
"v2.listInvestigations": false,
246+
"v2.triggerInvestigation": false,
244247
"v2.createCaseJiraIssue": false,
245248
"v2.createCaseNotebook": false,
246249
"v2.createCaseServiceNowTicket": false,

0 commit comments

Comments
 (0)