Skip to content

Commit a42c0cd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6efe27e of spec repo
1 parent 67fdf5b commit a42c0cd

34 files changed

Lines changed: 3898 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 523 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: 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": {

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
@@ -2778,6 +2778,10 @@ def overrides
27782778
"v2.get_finding_response" => "GetFindingResponse",
27792779
"v2.get_interfaces_data" => "GetInterfacesData",
27802780
"v2.get_interfaces_response" => "GetInterfacesResponse",
2781+
"v2.get_investigation_response" => "GetInvestigationResponse",
2782+
"v2.get_investigation_response_data" => "GetInvestigationResponseData",
2783+
"v2.get_investigation_response_data_attributes" => "GetInvestigationResponseDataAttributes",
2784+
"v2.get_investigation_response_links" => "GetInvestigationResponseLinks",
27812785
"v2.get_issue_include_query_parameter_item" => "GetIssueIncludeQueryParameterItem",
27822786
"v2.get_mapping_response" => "GetMappingResponse",
27832787
"v2.get_mapping_response_data" => "GetMappingResponseData",
@@ -3135,6 +3139,8 @@ def overrides
31353139
"v2.integration_type" => "IntegrationType",
31363140
"v2.interface_attributes" => "InterfaceAttributes",
31373141
"v2.interface_attributes_status" => "InterfaceAttributesStatus",
3142+
"v2.investigation_conclusion" => "InvestigationConclusion",
3143+
"v2.investigation_type" => "InvestigationType",
31383144
"v2.ip_allowlist_attributes" => "IPAllowlistAttributes",
31393145
"v2.ip_allowlist_data" => "IPAllowlistData",
31403146
"v2.ip_allowlist_entry" => "IPAllowlistEntry",
@@ -3309,6 +3315,12 @@ def overrides
33093315
"v2.list_integrations_response" => "ListIntegrationsResponse",
33103316
"v2.list_interface_tags_response" => "ListInterfaceTagsResponse",
33113317
"v2.list_interface_tags_response_data" => "ListInterfaceTagsResponseData",
3318+
"v2.list_investigations_response" => "ListInvestigationsResponse",
3319+
"v2.list_investigations_response_data" => "ListInvestigationsResponseData",
3320+
"v2.list_investigations_response_data_attributes" => "ListInvestigationsResponseDataAttributes",
3321+
"v2.list_investigations_response_links" => "ListInvestigationsResponseLinks",
3322+
"v2.list_investigations_response_meta" => "ListInvestigationsResponseMeta",
3323+
"v2.list_investigations_response_meta_page" => "ListInvestigationsResponseMetaPage",
33123324
"v2.list_kind_catalog_response" => "ListKindCatalogResponse",
33133325
"v2.list_notification_channels_response" => "ListNotificationChannelsResponse",
33143326
"v2.list_on_call_notification_rules_response" => "ListOnCallNotificationRulesResponse",
@@ -3620,6 +3632,7 @@ def overrides
36203632
"v2.microsoft_teams_workflows_webhook_handles_response" => "MicrosoftTeamsWorkflowsWebhookHandlesResponse",
36213633
"v2.microsoft_teams_workflows_webhook_handle_type" => "MicrosoftTeamsWorkflowsWebhookHandleType",
36223634
"v2.microsoft_teams_workflows_webhook_response_attributes" => "MicrosoftTeamsWorkflowsWebhookResponseAttributes",
3635+
"v2.monitor_alert_trigger_attributes" => "MonitorAlertTriggerAttributes",
36233636
"v2.monitor_config_policy_attribute_create_request" => "MonitorConfigPolicyAttributeCreateRequest",
36243637
"v2.monitor_config_policy_attribute_edit_request" => "MonitorConfigPolicyAttributeEditRequest",
36253638
"v2.monitor_config_policy_attribute_response" => "MonitorConfigPolicyAttributeResponse",
@@ -5554,8 +5567,18 @@ def overrides
55545567
"v2.timeseries_response_series" => "TimeseriesResponseSeries",
55555568
"v2.token_type" => "TokenType",
55565569
"v2.trigger" => "Trigger",
5570+
"v2.trigger_attributes" => "TriggerAttributes",
5571+
"v2.trigger_investigation_request" => "TriggerInvestigationRequest",
5572+
"v2.trigger_investigation_request_data" => "TriggerInvestigationRequestData",
5573+
"v2.trigger_investigation_request_data_attributes" => "TriggerInvestigationRequestDataAttributes",
5574+
"v2.trigger_investigation_request_type" => "TriggerInvestigationRequestType",
5575+
"v2.trigger_investigation_response" => "TriggerInvestigationResponse",
5576+
"v2.trigger_investigation_response_data" => "TriggerInvestigationResponseData",
5577+
"v2.trigger_investigation_response_data_attributes" => "TriggerInvestigationResponseDataAttributes",
5578+
"v2.trigger_investigation_response_type" => "TriggerInvestigationResponseType",
55575579
"v2.trigger_rate_limit" => "TriggerRateLimit",
55585580
"v2.trigger_source" => "TriggerSource",
5581+
"v2.trigger_type" => "TriggerType",
55595582
"v2.uc_config_pair" => "UCConfigPair",
55605583
"v2.uc_config_pair_data" => "UCConfigPairData",
55615584
"v2.uc_config_pair_data_attributes" => "UCConfigPairDataAttributes",
@@ -5852,6 +5875,7 @@ def overrides
58525875
"v2.authn_mappings_api" => "AuthNMappingsAPI",
58535876
"v2.aws_integration_api" => "AWSIntegrationAPI",
58545877
"v2.aws_logs_integration_api" => "AWSLogsIntegrationAPI",
5878+
"v2.bits_ai_api" => "BitsAIAPI",
58555879
"v2.case_management_api" => "CaseManagementAPI",
58565880
"v2.case_management_attribute_api" => "CaseManagementAttributeAPI",
58575881
"v2.case_management_type_api" => "CaseManagementTypeAPI",

0 commit comments

Comments
 (0)