Skip to content

Commit 20b42b4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[query] rm note about unstable datasources (#2086)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 2db09ff commit 20b42b4

File tree

9 files changed

+4
-50
lines changed

9 files changed

+4
-50
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-11-05 20:16:41.645334",
8-
"spec_repo_commit": "1a56bfda"
7+
"regenerated": "2024-11-05 21:07:13.880957",
8+
"spec_repo_commit": "6c0fa1b6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-11-05 20:16:41.665547",
13-
"spec_repo_commit": "1a56bfda"
12+
"regenerated": "2024-11-05 21:07:13.899409",
13+
"spec_repo_commit": "6c0fa1b6"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35699,12 +35699,6 @@ paths:
3569935699
operator: OR
3570035700
permissions:
3570135701
- timeseries_query
35702-
x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring
35703-
(RUM), Cloud Cost Management, and Log Management data sources.
35704-
35705-
We are gradually onboarding support for more sources. If you have any
35706-
35707-
feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
3570835702
/api/v2/query/timeseries:
3570935703
post:
3571035704
description: 'Query timeseries data across various data sources and
@@ -35745,12 +35739,6 @@ paths:
3574535739
operator: OR
3574635740
permissions:
3574735741
- timeseries_query
35748-
x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring
35749-
(RUM), Cloud Cost Management, and Log Management data sources.
35750-
35751-
We are gradually onboarding support for more sources. If you have any
35752-
35753-
feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
3575435742
/api/v2/remote_config/products/cws/agent_rules:
3575535743
get:
3575635744
description: Get the list of Cloud Security Management Threats Agent rules.

examples/v2/metrics/QueryScalarData.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Query scalar data across multiple products returns "OK" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.query_scalar_data".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::MetricsAPI.new
85

96
body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({

examples/v2/metrics/QueryScalarData_3112571352.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Scalar cross product query returns "OK" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.query_scalar_data".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::MetricsAPI.new
85

96
body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({

examples/v2/metrics/QueryTimeseriesData.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Query timeseries data across multiple products returns "OK" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.query_timeseries_data".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::MetricsAPI.new
85

96
body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({

examples/v2/metrics/QueryTimeseriesData_301142940.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Timeseries cross product query returns "OK" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.query_timeseries_data".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::MetricsAPI.new
85

96
body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({

features/v2/metrics.feature

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ Feature: Metrics
246246
@generated @skip @team:Datadog/timeseries-query
247247
Scenario: Query scalar data across multiple products returns "Bad Request" response
248248
Given a valid "appKeyAuth" key in the system
249-
And operation "QueryScalarData" enabled
250249
And new "QueryScalarData" request
251250
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "scalar_request"}}
252251
When the request is sent
@@ -255,7 +254,6 @@ Feature: Metrics
255254
@generated @skip @team:Datadog/timeseries-query
256255
Scenario: Query scalar data across multiple products returns "OK" response
257256
Given a valid "appKeyAuth" key in the system
258-
And operation "QueryScalarData" enabled
259257
And new "QueryScalarData" request
260258
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "scalar_request"}}
261259
When the request is sent
@@ -264,7 +262,6 @@ Feature: Metrics
264262
@generated @skip @team:Datadog/timeseries-query
265263
Scenario: Query timeseries data across multiple products returns "Bad Request" response
266264
Given a valid "appKeyAuth" key in the system
267-
And operation "QueryTimeseriesData" enabled
268265
And new "QueryTimeseriesData" request
269266
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "timeseries_request"}}
270267
When the request is sent
@@ -273,7 +270,6 @@ Feature: Metrics
273270
@generated @skip @team:Datadog/timeseries-query
274271
Scenario: Query timeseries data across multiple products returns "OK" response
275272
Given a valid "appKeyAuth" key in the system
276-
And operation "QueryTimeseriesData" enabled
277273
And new "QueryTimeseriesData" request
278274
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "timeseries_request"}}
279275
When the request is sent
@@ -300,7 +296,6 @@ Feature: Metrics
300296
@team:Datadog/timeseries-query
301297
Scenario: Scalar cross product query returns "Bad Request" response
302298
Given a valid "appKeyAuth" key in the system
303-
And operation "QueryScalarData" enabled
304299
And new "QueryScalarData" request
305300
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": 1568923200000}, "type": "scalar_request"}}
306301
When the request is sent
@@ -309,7 +304,6 @@ Feature: Metrics
309304
@team:Datadog/timeseries-query
310305
Scenario: Scalar cross product query returns "OK" response
311306
Given a valid "appKeyAuth" key in the system
312-
And operation "QueryScalarData" enabled
313307
And new "QueryScalarData" request
314308
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
315309
When the request is sent
@@ -374,7 +368,6 @@ Feature: Metrics
374368
@skip @team:Datadog/timeseries-query
375369
Scenario: Timeseries cross product query returns "Bad Request" response
376370
Given a valid "appKeyAuth" key in the system
377-
And operation "QueryTimeseriesData" enabled
378371
And new "QueryTimeseriesData" request
379372
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*}"}], "to": {{ timestamp('now') }}}, "type": "timeseries_rquest"}}
380373
When the request is sent
@@ -383,7 +376,6 @@ Feature: Metrics
383376
@team:Datadog/timeseries-query
384377
Scenario: Timeseries cross product query returns "OK" response
385378
Given a valid "appKeyAuth" key in the system
386-
And operation "QueryTimeseriesData" enabled
387379
And new "QueryTimeseriesData" request
388380
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:datadog.estimated_usage.metrics.custom{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
389381
When the request is sent

lib/datadog_api_client/configuration.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ def initialize
222222
"v2.update_incident_integration": false,
223223
"v2.update_incident_todo": false,
224224
"v2.update_incident_type": false,
225-
"v2.query_scalar_data": false,
226-
"v2.query_timeseries_data": false,
227225
"v2.get_finding": false,
228226
"v2.list_findings": false,
229227
"v2.mute_findings": false,

lib/datadog_api_client/v2/api/metrics_api.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -820,12 +820,6 @@ def query_scalar_data(body, opts = {})
820820
# @param opts [Hash] the optional parameters
821821
# @return [Array<(ScalarFormulaQueryResponse, Integer, Hash)>] ScalarFormulaQueryResponse data, response status code and response headers
822822
def query_scalar_data_with_http_info(body, opts = {})
823-
unstable_enabled = @api_client.config.unstable_operations["v2.query_scalar_data".to_sym]
824-
if unstable_enabled
825-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_scalar_data")
826-
else
827-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_scalar_data"))
828-
end
829823

830824
if @api_client.config.debugging
831825
@api_client.config.logger.debug 'Calling API: MetricsAPI.query_scalar_data ...'
@@ -894,12 +888,6 @@ def query_timeseries_data(body, opts = {})
894888
# @param opts [Hash] the optional parameters
895889
# @return [Array<(TimeseriesFormulaQueryResponse, Integer, Hash)>] TimeseriesFormulaQueryResponse data, response status code and response headers
896890
def query_timeseries_data_with_http_info(body, opts = {})
897-
unstable_enabled = @api_client.config.unstable_operations["v2.query_timeseries_data".to_sym]
898-
if unstable_enabled
899-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_timeseries_data")
900-
else
901-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_timeseries_data"))
902-
end
903891

904892
if @api_client.config.debugging
905893
@api_client.config.logger.debug 'Calling API: MetricsAPI.query_timeseries_data ...'

0 commit comments

Comments
 (0)