Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30372,7 +30372,7 @@ components:
type: array
type: object
GetInvestigationResponse:
description: Response for a single Bits AI investigation.
description: Response for a single Bits AI SRE investigation.
properties:
data:
$ref: "#/components/schemas/GetInvestigationResponseData"
Expand Down Expand Up @@ -87059,7 +87059,7 @@ paths:
- user_access_manage
/api/v2/bits-ai/investigations:
get:
description: List all Bits AI investigations for the organization.
description: List all Bits AI SRE investigations for the organization.
operationId: ListInvestigations
parameters:
- description: Offset for pagination.
Expand Down Expand Up @@ -87126,9 +87126,9 @@ paths:
appKeyAuth: []
- AuthZ:
- bits_investigations_read
summary: List Bits AI investigations
summary: List Bits AI SRE investigations
tags:
- Bits AI
- Bits AI SRE
x-pagination:
limitParam: page[limit]
pageOffsetParam: page[offset]
Expand All @@ -87141,7 +87141,7 @@ paths:
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: Trigger a new Bits AI investigation based on a monitor alert.
description: Trigger a new Bits AI SRE investigation based on a monitor alert.
operationId: TriggerInvestigation
requestBody:
content:
Expand Down Expand Up @@ -87190,9 +87190,9 @@ paths:
appKeyAuth: []
- AuthZ:
- bits_investigations_write
summary: Trigger a Bits AI investigation
summary: Trigger a Bits AI SRE investigation
tags:
- Bits AI
- Bits AI SRE
x-codegen-request-body-name: body
"x-permission":
operator: OR
Expand All @@ -87203,7 +87203,7 @@ paths:
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/bits-ai/investigations/{id}:
get:
description: Get a specific Bits AI investigation by ID.
description: Get a specific Bits AI SRE investigation by ID.
operationId: GetInvestigation
parameters:
- description: The ID of the investigation.
Expand Down Expand Up @@ -87254,9 +87254,9 @@ paths:
appKeyAuth: []
- AuthZ:
- bits_investigations_read
summary: Get a Bits AI investigation
summary: Get a Bits AI SRE investigation
tags:
- Bits AI
- Bits AI SRE
"x-permission":
operator: OR
permissions:
Expand Down Expand Up @@ -132955,8 +132955,8 @@ tags:
sent from Identity Providers. Use these endpoints to manage your AuthN Mappings.
name: AuthN Mappings
- description: |-
Use the Bits AI endpoints to retrieve AI-powered investigations.
name: Bits AI
Use the Bits AI SRE endpoints to retrieve AI-powered investigations.
name: Bits AI SRE
- description: |-
Search or aggregate your CI Visibility pipeline events and send them to your Datadog site over HTTP. See the [CI Pipeline Visibility in Datadog page](https://docs.datadoghq.com/continuous_integration/pipelines/) for more information.
name: CI Visibility Pipelines
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Get a Bits AI investigation returns "OK" response
# Get a Bits AI SRE investigation returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_investigation".to_sym] = true
end
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
api_instance = DatadogAPIClient::V2::BitsAISREAPI.new
p api_instance.get_investigation("id")
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# List Bits AI investigations returns "OK" response
# List Bits AI SRE investigations returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_investigations".to_sym] = true
end
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
api_instance = DatadogAPIClient::V2::BitsAISREAPI.new
p api_instance.list_investigations()
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# List Bits AI investigations returns "OK" response with pagination
# List Bits AI SRE investigations returns "OK" response with pagination

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_investigations".to_sym] = true
end
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
api_instance = DatadogAPIClient::V2::BitsAISREAPI.new
api_instance.list_investigations_with_pagination() { |item| puts item }
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Trigger a Bits AI investigation returns "OK" response
# Trigger a Bits AI SRE investigation returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.trigger_investigation".to_sym] = true
end
api_instance = DatadogAPIClient::V2::BitsAIAPI.new
api_instance = DatadogAPIClient::V2::BitsAISREAPI.new

body = DatadogAPIClient::V2::TriggerInvestigationRequest.new({
data: DatadogAPIClient::V2::TriggerInvestigationRequestData.new({
Expand Down
24 changes: 12 additions & 12 deletions features/v2/bits_ai.feature → features/v2/bits_ai_sre.feature
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
@endpoint(bits-ai) @endpoint(bits-ai-v2)
Feature: Bits AI
Use the Bits AI endpoints to retrieve AI-powered investigations.
@endpoint(bits-ai-sre) @endpoint(bits-ai-sre-v2)
Feature: Bits AI SRE
Use the Bits AI SRE endpoints to retrieve AI-powered investigations.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "BitsAI" API
And an instance of "BitsAISRE" API

@generated @skip @team:DataDog/bits-ai
Scenario: Get a Bits AI investigation returns "Bad Request" response
Scenario: Get a Bits AI SRE investigation returns "Bad Request" response
Given operation "GetInvestigation" enabled
And new "GetInvestigation" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/bits-ai
Scenario: Get a Bits AI investigation returns "Not Found" response
Scenario: Get a Bits AI SRE investigation returns "Not Found" response
Given operation "GetInvestigation" enabled
And new "GetInvestigation" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/bits-ai
Scenario: Get a Bits AI investigation returns "OK" response
Scenario: Get a Bits AI SRE investigation returns "OK" response
Given operation "GetInvestigation" enabled
And new "GetInvestigation" request
And request contains "id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/bits-ai
Scenario: List Bits AI investigations returns "Bad Request" response
Scenario: List Bits AI SRE investigations returns "Bad Request" response
Given operation "ListInvestigations" enabled
And new "ListInvestigations" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/bits-ai
Scenario: List Bits AI investigations returns "OK" response
Scenario: List Bits AI SRE investigations returns "OK" response
Given operation "ListInvestigations" enabled
And new "ListInvestigations" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/bits-ai @with-pagination
Scenario: List Bits AI investigations returns "OK" response with pagination
Scenario: List Bits AI SRE investigations returns "OK" response with pagination
Given operation "ListInvestigations" enabled
And new "ListInvestigations" request
When the request with pagination is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/bits-ai
Scenario: Trigger a Bits AI investigation returns "Bad Request" response
Scenario: Trigger a Bits AI SRE investigation returns "Bad Request" response
Given operation "TriggerInvestigation" enabled
And new "TriggerInvestigation" request
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"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/bits-ai
Scenario: Trigger a Bits AI investigation returns "OK" response
Scenario: Trigger a Bits AI SRE investigation returns "OK" response
Given operation "TriggerInvestigation" enabled
And new "TriggerInvestigation" request
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"}}
Expand Down
6 changes: 3 additions & 3 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -706,19 +706,19 @@
}
},
"ListInvestigations": {
"tag": "Bits AI",
"tag": "Bits AI SRE",
"undo": {
"type": "safe"
}
},
"TriggerInvestigation": {
"tag": "Bits AI",
"tag": "Bits AI SRE",
"undo": {
"type": "unsafe"
}
},
"GetInvestigation": {
"tag": "Bits AI",
"tag": "Bits AI SRE",
"undo": {
"type": "safe"
}
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6316,7 +6316,7 @@ def overrides
"v2.authn_mappings_api" => "AuthNMappingsAPI",
"v2.aws_integration_api" => "AWSIntegrationAPI",
"v2.aws_logs_integration_api" => "AWSLogsIntegrationAPI",
"v2.bits_ai_api" => "BitsAIAPI",
"v2.bits_ai_sre_api" => "BitsAISREAPI",
"v2.case_management_api" => "CaseManagementAPI",
"v2.case_management_attribute_api" => "CaseManagementAttributeAPI",
"v2.case_management_type_api" => "CaseManagementTypeAPI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@
require 'cgi'

module DatadogAPIClient::V2
class BitsAIAPI
class BitsAISREAPI
attr_accessor :api_client

def initialize(api_client = DatadogAPIClient::APIClient.default)
@api_client = api_client
end

# Get a Bits AI investigation.
# Get a Bits AI SRE investigation.
#
# @see #get_investigation_with_http_info
def get_investigation(id, opts = {})
data, _status_code, _headers = get_investigation_with_http_info(id, opts)
data
end

# Get a Bits AI investigation.
# Get a Bits AI SRE investigation.
#
# Get a specific Bits AI investigation by ID.
# Get a specific Bits AI SRE investigation by ID.
#
# @param id [String] The ID of the investigation.
# @param opts [Hash] the optional parameters
Expand All @@ -47,11 +47,11 @@ def get_investigation_with_http_info(id, opts = {})
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: BitsAIAPI.get_investigation ...'
@api_client.config.logger.debug 'Calling API: BitsAISREAPI.get_investigation ...'
end
# verify the required parameter 'id' is set
if @api_client.config.client_side_validation && id.nil?
fail ArgumentError, "Missing the required parameter 'id' when calling BitsAIAPI.get_investigation"
fail ArgumentError, "Missing the required parameter 'id' when calling BitsAISREAPI.get_investigation"
end
# resource path
local_var_path = '/api/v2/bits-ai/investigations/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/'))
Expand Down Expand Up @@ -89,22 +89,22 @@ def get_investigation_with_http_info(id, opts = {})

data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: BitsAIAPI#get_investigation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
@api_client.config.logger.debug "API called: BitsAISREAPI#get_investigation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# List Bits AI investigations.
# List Bits AI SRE investigations.
#
# @see #list_investigations_with_http_info
def list_investigations(opts = {})
data, _status_code, _headers = list_investigations_with_http_info(opts)
data
end

# List Bits AI investigations.
# List Bits AI SRE investigations.
#
# List all Bits AI investigations for the organization.
# List all Bits AI SRE investigations for the organization.
#
# @param opts [Hash] the optional parameters
# @option opts [Integer] :page_offset Offset for pagination.
Expand All @@ -120,10 +120,10 @@ def list_investigations_with_http_info(opts = {})
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: BitsAIAPI.list_investigations ...'
@api_client.config.logger.debug 'Calling API: BitsAISREAPI.list_investigations ...'
end
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 100
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling BitsAIAPI.list_investigations, must be smaller than or equal to 100.'
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling BitsAISREAPI.list_investigations, must be smaller than or equal to 100.'
end
# resource path
local_var_path = '/api/v2/bits-ai/investigations'
Expand Down Expand Up @@ -164,12 +164,12 @@ def list_investigations_with_http_info(opts = {})

data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: BitsAIAPI#list_investigations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
@api_client.config.logger.debug "API called: BitsAISREAPI#list_investigations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# List Bits AI investigations.
# List Bits AI SRE investigations.
#
# Provide a paginated version of {#list_investigations}, returning all items.
#
Expand All @@ -190,17 +190,17 @@ def list_investigations_with_pagination(opts = {})
end
end

# Trigger a Bits AI investigation.
# Trigger a Bits AI SRE investigation.
#
# @see #trigger_investigation_with_http_info
def trigger_investigation(body, opts = {})
data, _status_code, _headers = trigger_investigation_with_http_info(body, opts)
data
end

# Trigger a Bits AI investigation.
# Trigger a Bits AI SRE investigation.
#
# Trigger a new Bits AI investigation based on a monitor alert.
# Trigger a new Bits AI SRE investigation based on a monitor alert.
#
# @param body [TriggerInvestigationRequest] Trigger investigation request body.
# @param opts [Hash] the optional parameters
Expand All @@ -214,11 +214,11 @@ def trigger_investigation_with_http_info(body, opts = {})
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: BitsAIAPI.trigger_investigation ...'
@api_client.config.logger.debug 'Calling API: BitsAISREAPI.trigger_investigation ...'
end
# verify the required parameter 'body' is set
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling BitsAIAPI.trigger_investigation"
fail ArgumentError, "Missing the required parameter 'body' when calling BitsAISREAPI.trigger_investigation"
end
# resource path
local_var_path = '/api/v2/bits-ai/investigations'
Expand Down Expand Up @@ -258,7 +258,7 @@ def trigger_investigation_with_http_info(body, opts = {})

data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: BitsAIAPI#trigger_investigation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
@api_client.config.logger.debug "API called: BitsAISREAPI#trigger_investigation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require 'time'

module DatadogAPIClient::V2
# Response for a single Bits AI investigation.
# Response for a single Bits AI SRE investigation.
class GetInvestigationResponse
include BaseGenericModel

Expand Down
Loading