diff --git a/.apigentools-info b/.apigentools-info index 9172b4b60da2..179d2fbdd430 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-05 19:40:57.590898", - "spec_repo_commit": "334a5ac9" + "regenerated": "2023-12-06 19:00:59.270611", + "spec_repo_commit": "6ccf2a1f" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-05 19:40:57.604681", - "spec_repo_commit": "334a5ac9" + "regenerated": "2023-12-06 19:00:59.291322", + "spec_repo_commit": "6ccf2a1f" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f30f514b6230..92130f2c8d6d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -22325,9 +22325,6 @@ paths: cursorPath: meta.page.after limitParam: page[limit] resultsPath: data - x-unstable: '**Note**: This endpoint is in beta. - - For access, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/events/search: post: description: 'List endpoint returns events that match an events search query. @@ -22370,9 +22367,6 @@ paths: cursorPath: meta.page.after limitParam: body.page.limit resultsPath: data - x-unstable: '**Note**: This endpoint is in beta. - - For access, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents: get: description: Get all incidents for the user's organization. diff --git a/examples/v2/events/ListEvents.rb b/examples/v2/events/ListEvents.rb index 9d5a4d1fd542..7e56179de0c8 100644 --- a/examples/v2/events/ListEvents.rb +++ b/examples/v2/events/ListEvents.rb @@ -1,8 +1,5 @@ # Get a list of events returns "OK" response require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_events".to_sym] = true -end api_instance = DatadogAPIClient::V2::EventsAPI.new p api_instance.list_events() diff --git a/examples/v2/events/ListEvents_1527584014.rb b/examples/v2/events/ListEvents_1527584014.rb index dd20ffd9238f..a17026447302 100644 --- a/examples/v2/events/ListEvents_1527584014.rb +++ b/examples/v2/events/ListEvents_1527584014.rb @@ -1,9 +1,6 @@ # Get a list of events returns "OK" response with pagination require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_events".to_sym] = true -end api_instance = DatadogAPIClient::V2::EventsAPI.new opts = { filter_from: "now-15m", diff --git a/examples/v2/events/ListEvents_2663715109.rb b/examples/v2/events/ListEvents_2663715109.rb index 995a4bf0958d..642fa67821a2 100644 --- a/examples/v2/events/ListEvents_2663715109.rb +++ b/examples/v2/events/ListEvents_2663715109.rb @@ -1,9 +1,6 @@ # Get a quick list of events returns "OK" response require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_events".to_sym] = true -end api_instance = DatadogAPIClient::V2::EventsAPI.new opts = { filter_query: "datadog-agent", diff --git a/examples/v2/events/SearchEvents.rb b/examples/v2/events/SearchEvents.rb index 50597c56238f..5b7515bbc1a3 100644 --- a/examples/v2/events/SearchEvents.rb +++ b/examples/v2/events/SearchEvents.rb @@ -1,9 +1,6 @@ # Search events returns "OK" response require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.search_events".to_sym] = true -end api_instance = DatadogAPIClient::V2::EventsAPI.new body = DatadogAPIClient::V2::EventsListRequest.new({ diff --git a/examples/v2/events/SearchEvents_3856995058.rb b/examples/v2/events/SearchEvents_3856995058.rb index b5d738122abb..6d98f5c820db 100644 --- a/examples/v2/events/SearchEvents_3856995058.rb +++ b/examples/v2/events/SearchEvents_3856995058.rb @@ -1,9 +1,6 @@ # Search events returns "OK" response with pagination require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.search_events".to_sym] = true -end api_instance = DatadogAPIClient::V2::EventsAPI.new body = DatadogAPIClient::V2::EventsListRequest.new({ diff --git a/features/v2/events.feature b/features/v2/events.feature index 8c900fbc9e44..50954f2b206e 100644 --- a/features/v2/events.feature +++ b/features/v2/events.feature @@ -12,22 +12,19 @@ Feature: Events @generated @skip @team:DataDog/event-management Scenario: Get a list of events returns "Bad Request" response - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request When the request is sent Then the response status is 400 Bad Request @skip-validation @team:DataDog/event-management Scenario: Get a list of events returns "OK" response - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request When the request is sent Then the response status is 200 OK @replay-only @skip-validation @team:DataDog/event-management @with-pagination Scenario: Get a list of events returns "OK" response with pagination - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request And request contains "filter[from]" parameter with value "now-15m" And request contains "filter[to]" parameter with value "now" And request contains "page[limit]" parameter with value 2 @@ -37,8 +34,7 @@ Feature: Events @team:DataDog/event-management Scenario: Get a quick list of events returns "OK" response - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request And request contains "filter[query]" parameter with value "datadog-agent" And request contains "filter[from]" parameter with value "2020-09-17T11:48:36+01:00" And request contains "filter[to]" parameter with value "2020-09-17T12:48:36+01:00" @@ -49,16 +45,14 @@ Feature: Events @team:DataDog/event-management Scenario: Search events returns "Bad Request" response - Given operation "SearchEvents" enabled - And new "SearchEvents" request + Given new "SearchEvents" request And body with value {"filter": {"from": "now-15m", "query": "service:web* AND @http.status_code:[200 TO 299]", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} When the request is sent Then the response status is 400 Bad Request @team:DataDog/event-management Scenario: Search events returns "OK" response - Given operation "SearchEvents" enabled - And new "SearchEvents" request + Given new "SearchEvents" request And body with value {"filter": {"query": "datadog-agent", "from": "2020-09-17T11:48:36+01:00", "to": "2020-09-17T12:48:36+01:00"}, "sort": "timestamp", "page": {"limit": 5}} When the request is sent Then the response status is 200 OK @@ -66,8 +60,7 @@ Feature: Events @replay-only @skip-validation @team:DataDog/event-management @with-pagination Scenario: Search events returns "OK" response with pagination - Given operation "SearchEvents" enabled - And new "SearchEvents" request + Given new "SearchEvents" request And body with value {"filter": {"from": "now-15m", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"} When the request with pagination is sent Then the response status is 200 OK diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index b2b8aa580736..0c844252d92a 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -194,8 +194,6 @@ def initialize "v2.get_monthly_cost_attribution": false, "v2.create_dora_deployment": false, "v2.create_dora_incident": false, - "v2.list_events": false, - "v2.search_events": false, "v2.create_incident": false, "v2.create_incident_integration": false, "v2.create_incident_todo": false, diff --git a/lib/datadog_api_client/v2/api/events_api.rb b/lib/datadog_api_client/v2/api/events_api.rb index b33f301cae38..859d0cec9835 100644 --- a/lib/datadog_api_client/v2/api/events_api.rb +++ b/lib/datadog_api_client/v2/api/events_api.rb @@ -47,12 +47,6 @@ def list_events(opts = {}) # @option opts [Integer] :page_limit Maximum number of events in the response. # @return [Array<(EventsListResponse, Integer, Hash)>] EventsListResponse data, response status code and response headers def list_events_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_events".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_events") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_events")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsAPI.list_events ...' @@ -151,12 +145,6 @@ def search_events(opts = {}) # @option opts [EventsListRequest] :body # @return [Array<(EventsListResponse, Integer, Hash)>] EventsListResponse data, response status code and response headers def search_events_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.search_events".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_events") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_events")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsAPI.search_events ...'