diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 323c27bbdf2d..590644a52e01 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -173432,9 +173432,6 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write - x-unstable: |- - **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: >- Create ServiceNow tickets for security findings. @@ -173505,9 +173502,6 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security/sboms: get: description: |- diff --git a/examples/v2/security-monitoring/AttachServiceNowTicket.rb b/examples/v2/security-monitoring/AttachServiceNowTicket.rb index fa0191d7b75f..92981be61fd4 100644 --- a/examples/v2/security-monitoring/AttachServiceNowTicket.rb +++ b/examples/v2/security-monitoring/AttachServiceNowTicket.rb @@ -1,9 +1,6 @@ # Attach security findings to a ServiceNow ticket returns "OK" response require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.attach_service_now_ticket".to_sym] = true -end api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new body = DatadogAPIClient::V2::AttachServiceNowTicketRequest.new({ diff --git a/examples/v2/security-monitoring/CreateServiceNowTickets.rb b/examples/v2/security-monitoring/CreateServiceNowTickets.rb index e87c00b1bbc6..65f672481970 100644 --- a/examples/v2/security-monitoring/CreateServiceNowTickets.rb +++ b/examples/v2/security-monitoring/CreateServiceNowTickets.rb @@ -1,9 +1,6 @@ # Create ServiceNow tickets for security findings returns "Created" response require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_service_now_tickets".to_sym] = true -end api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new body = DatadogAPIClient::V2::CreateServiceNowTicketRequestArray.new({ diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 3ec8e88ce325..2801a4c5dc77 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -113,24 +113,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a ServiceNow ticket returns "Bad Request" response - Given operation "AttachServiceNowTicket" enabled - And new "AttachServiceNowTicket" request + Given new "AttachServiceNowTicket" request And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a ServiceNow ticket returns "Not Found" response - Given operation "AttachServiceNowTicket" enabled - And new "AttachServiceNowTicket" request + Given new "AttachServiceNowTicket" request And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a ServiceNow ticket returns "OK" response - Given operation "AttachServiceNowTicket" enabled - And new "AttachServiceNowTicket" request + Given new "AttachServiceNowTicket" request And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}} When the request is sent Then the response status is 200 OK @@ -532,24 +529,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Create ServiceNow tickets for security findings returns "Bad Request" response - Given operation "CreateServiceNowTickets" enabled - And new "CreateServiceNowTickets" request + Given new "CreateServiceNowTickets" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-investigation Scenario: Create ServiceNow tickets for security findings returns "Created" response - Given operation "CreateServiceNowTickets" enabled - And new "CreateServiceNowTickets" request + Given new "CreateServiceNowTickets" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]} When the request is sent Then the response status is 201 Created @generated @skip @team:DataDog/k9-investigation Scenario: Create ServiceNow tickets for security findings returns "Not Found" response - Given operation "CreateServiceNowTickets" enabled - And new "CreateServiceNowTickets" request + Given new "CreateServiceNowTickets" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]} When the request is sent Then the response status is 404 Not Found diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 3cccaa92c8b1..850ba98a759c 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -337,7 +337,6 @@ def initialize "v2.get_aws_cloud_auth_persona_mapping": false, "v2.list_aws_cloud_auth_persona_mappings": false, "v2.activate_content_pack": false, - "v2.attach_service_now_ticket": false, "v2.batch_get_security_monitoring_dataset_dependencies": false, "v2.bulk_create_sample_log_generation_subscriptions": false, "v2.bulk_export_security_monitoring_terraform_resources": false, @@ -351,7 +350,6 @@ def initialize "v2.create_security_findings_automation_ticket_creation_rule": false, "v2.create_security_monitoring_dataset": false, "v2.create_security_monitoring_integration_config": false, - "v2.create_service_now_tickets": false, "v2.create_static_analysis_ast": false, "v2.create_static_analysis_server_analysis": false, "v2.deactivate_content_pack": false, diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index ee29d62cdb0a..51e880ecbe92 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -254,12 +254,6 @@ def attach_service_now_ticket(body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(FindingCaseResponse, Integer, Hash)>] FindingCaseResponse data, response status code and response headers def attach_service_now_ticket_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.attach_service_now_ticket".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.attach_service_now_ticket") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.attach_service_now_ticket")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.attach_service_now_ticket ...' @@ -2348,12 +2342,6 @@ def create_service_now_tickets(body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(FindingCaseResponseArray, Integer, Hash)>] FindingCaseResponseArray data, response status code and response headers def create_service_now_tickets_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_service_now_tickets".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_service_now_tickets") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_service_now_tickets")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_service_now_tickets ...'