Skip to content

Commit 786ab7f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7eb0a5e of spec repo
1 parent 4ed6159 commit 786ab7f

34 files changed

Lines changed: 3904 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 527 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get a Bits AI investigation returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_investigation".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
8+
p api_instance.get_investigation("id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List Bits AI investigations returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_investigations".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
8+
p api_instance.list_investigations()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List Bits AI investigations returns "OK" response with pagination
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_investigations".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
8+
api_instance.list_investigations_with_pagination() { |item| puts item }
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Trigger a Bits AI investigation returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.trigger_investigation".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
8+
9+
body = DatadogAPIClient::V2::TriggerInvestigationRequest.new({
10+
data: DatadogAPIClient::V2::TriggerInvestigationRequestData.new({
11+
attributes: DatadogAPIClient::V2::TriggerInvestigationRequestDataAttributes.new({
12+
trigger: DatadogAPIClient::V2::TriggerAttributes.new({
13+
monitor_alert_trigger: DatadogAPIClient::V2::MonitorAlertTriggerAttributes.new({
14+
event_id: "1234567890123456789",
15+
event_ts: 1700000000000,
16+
monitor_id: 12345678,
17+
}),
18+
type: DatadogAPIClient::V2::TriggerType::MONITOR_ALERT_TRIGGER,
19+
}),
20+
}),
21+
type: DatadogAPIClient::V2::TriggerInvestigationRequestType::TRIGGER_INVESTIGATION_REQUEST,
22+
}),
23+
})
24+
p api_instance.trigger_investigation(body)

features/scenarios_model_mapping.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,17 @@
11781178
"authn_mapping_id" => "String",
11791179
"body" => "AuthNMappingUpdateRequest",
11801180
},
1181+
"v2.ListInvestigations" => {
1182+
"page_offset" => "Integer",
1183+
"page_limit" => "Integer",
1184+
"filter_monitor_id" => "Integer",
1185+
},
1186+
"v2.TriggerInvestigation" => {
1187+
"body" => "TriggerInvestigationRequest",
1188+
},
1189+
"v2.GetInvestigation" => {
1190+
"id" => "String",
1191+
},
11811192
"v2.SearchCases" => {
11821193
"page_size" => "Integer",
11831194
"page_number" => "Integer",

features/v2/bits_ai.feature

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

lib/datadog_api_client/configuration.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ def initialize
208208
"v2.get_open_api": false,
209209
"v2.list_apis": false,
210210
"v2.update_open_api": false,
211+
"v2.get_investigation": false,
212+
"v2.list_investigations": false,
213+
"v2.trigger_investigation": false,
211214
"v2.create_case_jira_issue": false,
212215
"v2.create_case_notebook": false,
213216
"v2.create_case_service_now_ticket": false,

lib/datadog_api_client/inflector.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2760,6 +2760,10 @@ def overrides
27602760
"v2.get_finding_response" => "GetFindingResponse",
27612761
"v2.get_interfaces_data" => "GetInterfacesData",
27622762
"v2.get_interfaces_response" => "GetInterfacesResponse",
2763+
"v2.get_investigation_response" => "GetInvestigationResponse",
2764+
"v2.get_investigation_response_data" => "GetInvestigationResponseData",
2765+
"v2.get_investigation_response_data_attributes" => "GetInvestigationResponseDataAttributes",
2766+
"v2.get_investigation_response_links" => "GetInvestigationResponseLinks",
27632767
"v2.get_issue_include_query_parameter_item" => "GetIssueIncludeQueryParameterItem",
27642768
"v2.get_mapping_response" => "GetMappingResponse",
27652769
"v2.get_mapping_response_data" => "GetMappingResponseData",
@@ -3114,6 +3118,8 @@ def overrides
31143118
"v2.integration_type" => "IntegrationType",
31153119
"v2.interface_attributes" => "InterfaceAttributes",
31163120
"v2.interface_attributes_status" => "InterfaceAttributesStatus",
3121+
"v2.investigation_conclusion" => "InvestigationConclusion",
3122+
"v2.investigation_type" => "InvestigationType",
31173123
"v2.ip_allowlist_attributes" => "IPAllowlistAttributes",
31183124
"v2.ip_allowlist_data" => "IPAllowlistData",
31193125
"v2.ip_allowlist_entry" => "IPAllowlistEntry",
@@ -3287,6 +3293,12 @@ def overrides
32873293
"v2.list_integrations_response" => "ListIntegrationsResponse",
32883294
"v2.list_interface_tags_response" => "ListInterfaceTagsResponse",
32893295
"v2.list_interface_tags_response_data" => "ListInterfaceTagsResponseData",
3296+
"v2.list_investigations_response" => "ListInvestigationsResponse",
3297+
"v2.list_investigations_response_data" => "ListInvestigationsResponseData",
3298+
"v2.list_investigations_response_data_attributes" => "ListInvestigationsResponseDataAttributes",
3299+
"v2.list_investigations_response_links" => "ListInvestigationsResponseLinks",
3300+
"v2.list_investigations_response_meta" => "ListInvestigationsResponseMeta",
3301+
"v2.list_investigations_response_meta_page" => "ListInvestigationsResponseMetaPage",
32903302
"v2.list_kind_catalog_response" => "ListKindCatalogResponse",
32913303
"v2.list_notification_channels_response" => "ListNotificationChannelsResponse",
32923304
"v2.list_on_call_notification_rules_response" => "ListOnCallNotificationRulesResponse",
@@ -3598,6 +3610,7 @@ def overrides
35983610
"v2.microsoft_teams_workflows_webhook_handles_response" => "MicrosoftTeamsWorkflowsWebhookHandlesResponse",
35993611
"v2.microsoft_teams_workflows_webhook_handle_type" => "MicrosoftTeamsWorkflowsWebhookHandleType",
36003612
"v2.microsoft_teams_workflows_webhook_response_attributes" => "MicrosoftTeamsWorkflowsWebhookResponseAttributes",
3613+
"v2.monitor_alert_trigger_attributes" => "MonitorAlertTriggerAttributes",
36013614
"v2.monitor_config_policy_attribute_create_request" => "MonitorConfigPolicyAttributeCreateRequest",
36023615
"v2.monitor_config_policy_attribute_edit_request" => "MonitorConfigPolicyAttributeEditRequest",
36033616
"v2.monitor_config_policy_attribute_response" => "MonitorConfigPolicyAttributeResponse",
@@ -5526,8 +5539,18 @@ def overrides
55265539
"v2.timeseries_response_series" => "TimeseriesResponseSeries",
55275540
"v2.token_type" => "TokenType",
55285541
"v2.trigger" => "Trigger",
5542+
"v2.trigger_attributes" => "TriggerAttributes",
5543+
"v2.trigger_investigation_request" => "TriggerInvestigationRequest",
5544+
"v2.trigger_investigation_request_data" => "TriggerInvestigationRequestData",
5545+
"v2.trigger_investigation_request_data_attributes" => "TriggerInvestigationRequestDataAttributes",
5546+
"v2.trigger_investigation_request_type" => "TriggerInvestigationRequestType",
5547+
"v2.trigger_investigation_response" => "TriggerInvestigationResponse",
5548+
"v2.trigger_investigation_response_data" => "TriggerInvestigationResponseData",
5549+
"v2.trigger_investigation_response_data_attributes" => "TriggerInvestigationResponseDataAttributes",
5550+
"v2.trigger_investigation_response_type" => "TriggerInvestigationResponseType",
55295551
"v2.trigger_rate_limit" => "TriggerRateLimit",
55305552
"v2.trigger_source" => "TriggerSource",
5553+
"v2.trigger_type" => "TriggerType",
55315554
"v2.uc_config_pair" => "UCConfigPair",
55325555
"v2.uc_config_pair_data" => "UCConfigPairData",
55335556
"v2.uc_config_pair_data_attributes" => "UCConfigPairDataAttributes",
@@ -5821,6 +5844,7 @@ def overrides
58215844
"v2.authn_mappings_api" => "AuthNMappingsAPI",
58225845
"v2.aws_integration_api" => "AWSIntegrationAPI",
58235846
"v2.aws_logs_integration_api" => "AWSLogsIntegrationAPI",
5847+
"v2.bits_ai_api" => "BitsAIAPI",
58245848
"v2.case_management_api" => "CaseManagementAPI",
58255849
"v2.case_management_attribute_api" => "CaseManagementAttributeAPI",
58265850
"v2.case_management_type_api" => "CaseManagementTypeAPI",

0 commit comments

Comments
 (0)