diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 7ab82fd266b..3f1b2e7402e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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" @@ -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. @@ -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] @@ -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: @@ -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 @@ -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. @@ -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: @@ -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 diff --git a/api/datadogV2/api_bits_ai.go b/api/datadogV2/api_bits_ai_sre.go similarity index 90% rename from api/datadogV2/api_bits_ai.go rename to api/datadogV2/api_bits_ai_sre.go index 80e7f216770..b0f3fc010c3 100644 --- a/api/datadogV2/api_bits_ai.go +++ b/api/datadogV2/api_bits_ai_sre.go @@ -14,12 +14,12 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// BitsAIApi service type -type BitsAIApi datadog.Service +// BitsAISREApi service type +type BitsAISREApi datadog.Service -// GetInvestigation Get a Bits AI investigation. -// Get a specific Bits AI investigation by ID. -func (a *BitsAIApi) GetInvestigation(ctx _context.Context, id string) (GetInvestigationResponse, *_nethttp.Response, error) { +// GetInvestigation Get a Bits AI SRE investigation. +// Get a specific Bits AI SRE investigation by ID. +func (a *BitsAISREApi) GetInvestigation(ctx _context.Context, id string) (GetInvestigationResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -35,7 +35,7 @@ func (a *BitsAIApi) GetInvestigation(ctx _context.Context, id string) (GetInvest _log.Printf("WARNING: Using unstable operation '%s'", operationId) } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.BitsAIApi.GetInvestigation") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.BitsAISREApi.GetInvestigation") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -144,9 +144,9 @@ func (r *ListInvestigationsOptionalParameters) WithFilterMonitorId(filterMonitor return r } -// ListInvestigations List Bits AI investigations. -// List all Bits AI investigations for the organization. -func (a *BitsAIApi) ListInvestigations(ctx _context.Context, o ...ListInvestigationsOptionalParameters) (ListInvestigationsResponse, *_nethttp.Response, error) { +// ListInvestigations List Bits AI SRE investigations. +// List all Bits AI SRE investigations for the organization. +func (a *BitsAISREApi) ListInvestigations(ctx _context.Context, o ...ListInvestigationsOptionalParameters) (ListInvestigationsResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -170,7 +170,7 @@ func (a *BitsAIApi) ListInvestigations(ctx _context.Context, o ...ListInvestigat _log.Printf("WARNING: Using unstable operation '%s'", operationId) } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.BitsAIApi.ListInvestigations") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.BitsAISREApi.ListInvestigations") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -257,7 +257,7 @@ func (a *BitsAIApi) ListInvestigations(ctx _context.Context, o ...ListInvestigat } // ListInvestigationsWithPagination provides a paginated version of ListInvestigations returning a channel with all items. -func (a *BitsAIApi) ListInvestigationsWithPagination(ctx _context.Context, o ...ListInvestigationsOptionalParameters) (<-chan datadog.PaginationResult[ListInvestigationsResponseData], func()) { +func (a *BitsAISREApi) ListInvestigationsWithPagination(ctx _context.Context, o ...ListInvestigationsOptionalParameters) (<-chan datadog.PaginationResult[ListInvestigationsResponseData], func()) { ctx, cancel := _context.WithCancel(ctx) pageSize_ := int64(25) if len(o) == 0 { @@ -306,9 +306,9 @@ func (a *BitsAIApi) ListInvestigationsWithPagination(ctx _context.Context, o ... return items, cancel } -// TriggerInvestigation Trigger a Bits AI investigation. -// Trigger a new Bits AI investigation based on a monitor alert. -func (a *BitsAIApi) TriggerInvestigation(ctx _context.Context, body TriggerInvestigationRequest) (TriggerInvestigationResponse, *_nethttp.Response, error) { +// TriggerInvestigation Trigger a Bits AI SRE investigation. +// Trigger a new Bits AI SRE investigation based on a monitor alert. +func (a *BitsAISREApi) TriggerInvestigation(ctx _context.Context, body TriggerInvestigationRequest) (TriggerInvestigationResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -324,7 +324,7 @@ func (a *BitsAIApi) TriggerInvestigation(ctx _context.Context, body TriggerInves _log.Printf("WARNING: Using unstable operation '%s'", operationId) } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.BitsAIApi.TriggerInvestigation") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.BitsAISREApi.TriggerInvestigation") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -404,9 +404,9 @@ func (a *BitsAIApi) TriggerInvestigation(ctx _context.Context, body TriggerInves return localVarReturnValue, localVarHTTPResponse, nil } -// NewBitsAIApi Returns NewBitsAIApi. -func NewBitsAIApi(client *datadog.APIClient) *BitsAIApi { - return &BitsAIApi{ +// NewBitsAISREApi Returns NewBitsAISREApi. +func NewBitsAISREApi(client *datadog.APIClient) *BitsAISREApi { + return &BitsAISREApi{ Client: client, } } diff --git a/api/datadogV2/doc.go b/api/datadogV2/doc.go index 6f8bcc7bcda..73cc11d273f 100644 --- a/api/datadogV2/doc.go +++ b/api/datadogV2/doc.go @@ -94,9 +94,9 @@ // - [AuthNMappingsApi.GetAuthNMapping] // - [AuthNMappingsApi.ListAuthNMappings] // - [AuthNMappingsApi.UpdateAuthNMapping] -// - [BitsAIApi.GetInvestigation] -// - [BitsAIApi.ListInvestigations] -// - [BitsAIApi.TriggerInvestigation] +// - [BitsAISREApi.GetInvestigation] +// - [BitsAISREApi.ListInvestigations] +// - [BitsAISREApi.TriggerInvestigation] // - [CIVisibilityPipelinesApi.AggregateCIAppPipelineEvents] // - [CIVisibilityPipelinesApi.CreateCIAppPipelineEvent] // - [CIVisibilityPipelinesApi.ListCIAppPipelineEvents] diff --git a/api/datadogV2/model_get_investigation_response.go b/api/datadogV2/model_get_investigation_response.go index dad987413c4..a1e93289f2d 100644 --- a/api/datadogV2/model_get_investigation_response.go +++ b/api/datadogV2/model_get_investigation_response.go @@ -10,7 +10,7 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// GetInvestigationResponse Response for a single Bits AI investigation. +// GetInvestigationResponse Response for a single Bits AI SRE investigation. type GetInvestigationResponse struct { // Data for the get investigation response. Data GetInvestigationResponseData `json:"data"` diff --git a/examples/v2/bits-ai/GetInvestigation.go b/examples/v2/bits-ai-sre/GetInvestigation.go similarity index 67% rename from examples/v2/bits-ai/GetInvestigation.go rename to examples/v2/bits-ai-sre/GetInvestigation.go index 58948f5b12d..0c70ec87d02 100644 --- a/examples/v2/bits-ai/GetInvestigation.go +++ b/examples/v2/bits-ai-sre/GetInvestigation.go @@ -1,4 +1,4 @@ -// Get a Bits AI investigation returns "OK" response +// Get a Bits AI SRE investigation returns "OK" response package main @@ -17,14 +17,14 @@ func main() { configuration := datadog.NewConfiguration() configuration.SetUnstableOperationEnabled("v2.GetInvestigation", true) apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewBitsAIApi(apiClient) + api := datadogV2.NewBitsAISREApi(apiClient) resp, r, err := api.GetInvestigation(ctx, "id") if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BitsAIApi.GetInvestigation`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `BitsAISREApi.GetInvestigation`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `BitsAIApi.GetInvestigation`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `BitsAISREApi.GetInvestigation`:\n%s\n", responseContent) } diff --git a/examples/v2/bits-ai/ListInvestigations.go b/examples/v2/bits-ai-sre/ListInvestigations.go similarity index 69% rename from examples/v2/bits-ai/ListInvestigations.go rename to examples/v2/bits-ai-sre/ListInvestigations.go index eaaa1d5cd05..08121a1db7b 100644 --- a/examples/v2/bits-ai/ListInvestigations.go +++ b/examples/v2/bits-ai-sre/ListInvestigations.go @@ -1,4 +1,4 @@ -// List Bits AI investigations returns "OK" response +// List Bits AI SRE investigations returns "OK" response package main @@ -17,14 +17,14 @@ func main() { configuration := datadog.NewConfiguration() configuration.SetUnstableOperationEnabled("v2.ListInvestigations", true) apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewBitsAIApi(apiClient) + api := datadogV2.NewBitsAISREApi(apiClient) resp, r, err := api.ListInvestigations(ctx, *datadogV2.NewListInvestigationsOptionalParameters()) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BitsAIApi.ListInvestigations`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `BitsAISREApi.ListInvestigations`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `BitsAIApi.ListInvestigations`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `BitsAISREApi.ListInvestigations`:\n%s\n", responseContent) } diff --git a/examples/v2/bits-ai/ListInvestigations_130750454.go b/examples/v2/bits-ai-sre/ListInvestigations_1361254656.go similarity index 76% rename from examples/v2/bits-ai/ListInvestigations_130750454.go rename to examples/v2/bits-ai-sre/ListInvestigations_1361254656.go index f8d5b194f47..ae3ec720391 100644 --- a/examples/v2/bits-ai/ListInvestigations_130750454.go +++ b/examples/v2/bits-ai-sre/ListInvestigations_1361254656.go @@ -1,4 +1,4 @@ -// List Bits AI investigations returns "OK" response with pagination +// List Bits AI SRE investigations returns "OK" response with pagination package main @@ -17,12 +17,12 @@ func main() { configuration := datadog.NewConfiguration() configuration.SetUnstableOperationEnabled("v2.ListInvestigations", true) apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewBitsAIApi(apiClient) + api := datadogV2.NewBitsAISREApi(apiClient) resp, _ := api.ListInvestigationsWithPagination(ctx, *datadogV2.NewListInvestigationsOptionalParameters()) for paginationResult := range resp { if paginationResult.Error != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BitsAIApi.ListInvestigations`: %v\n", paginationResult.Error) + fmt.Fprintf(os.Stderr, "Error when calling `BitsAISREApi.ListInvestigations`: %v\n", paginationResult.Error) } responseContent, _ := json.MarshalIndent(paginationResult.Item, "", " ") fmt.Fprintf(os.Stdout, "%s\n", responseContent) diff --git a/examples/v2/bits-ai/TriggerInvestigation.go b/examples/v2/bits-ai-sre/TriggerInvestigation.go similarity index 79% rename from examples/v2/bits-ai/TriggerInvestigation.go rename to examples/v2/bits-ai-sre/TriggerInvestigation.go index 2a0aa3800c7..9ee644d133e 100644 --- a/examples/v2/bits-ai/TriggerInvestigation.go +++ b/examples/v2/bits-ai-sre/TriggerInvestigation.go @@ -1,4 +1,4 @@ -// Trigger a Bits AI investigation returns "OK" response +// Trigger a Bits AI SRE investigation returns "OK" response package main @@ -32,14 +32,14 @@ func main() { configuration := datadog.NewConfiguration() configuration.SetUnstableOperationEnabled("v2.TriggerInvestigation", true) apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewBitsAIApi(apiClient) + api := datadogV2.NewBitsAISREApi(apiClient) resp, r, err := api.TriggerInvestigation(ctx, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BitsAIApi.TriggerInvestigation`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `BitsAISREApi.TriggerInvestigation`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `BitsAIApi.TriggerInvestigation`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `BitsAISREApi.TriggerInvestigation`:\n%s\n", responseContent) } diff --git a/tests/scenarios/api_mappings.go b/tests/scenarios/api_mappings.go index e1b71268e03..d1a4a2c4214 100644 --- a/tests/scenarios/api_mappings.go +++ b/tests/scenarios/api_mappings.go @@ -58,7 +58,7 @@ var apiMappings = map[string]map[string]reflect.Value{ "AppBuilderApi": reflect.ValueOf(datadogV2.NewAppBuilderApi), "AuditApi": reflect.ValueOf(datadogV2.NewAuditApi), "AuthNMappingsApi": reflect.ValueOf(datadogV2.NewAuthNMappingsApi), - "BitsAIApi": reflect.ValueOf(datadogV2.NewBitsAIApi), + "BitsAISREApi": reflect.ValueOf(datadogV2.NewBitsAISREApi), "CaseManagementApi": reflect.ValueOf(datadogV2.NewCaseManagementApi), "CaseManagementTypeApi": reflect.ValueOf(datadogV2.NewCaseManagementTypeApi), "CaseManagementAttributeApi": reflect.ValueOf(datadogV2.NewCaseManagementAttributeApi), diff --git a/tests/scenarios/features/v2/bits_ai.feature b/tests/scenarios/features/v2/bits_ai_sre.feature similarity index 76% rename from tests/scenarios/features/v2/bits_ai.feature rename to tests/scenarios/features/v2/bits_ai_sre.feature index bc5ec941d8f..12c8a3a1870 100644 --- a/tests/scenarios/features/v2/bits_ai.feature +++ b/tests/scenarios/features/v2/bits_ai_sre.feature @@ -1,14 +1,14 @@ -@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" @@ -16,7 +16,7 @@ Feature: Bits AI 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" @@ -24,7 +24,7 @@ Feature: Bits AI 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" @@ -32,28 +32,28 @@ Feature: Bits AI 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"}} @@ -61,7 +61,7 @@ Feature: Bits AI 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"}} diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index 71b0e9ba7af..ba5790b70cd 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -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" }