Skip to content

Commit

Permalink
[query] rm note about unstable datasources (#1893)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Nov 5, 2024
1 parent c5d48b5 commit 3a1bfd5
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 40 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-05 20:16:44.203879",
"spec_repo_commit": "1a56bfda"
"regenerated": "2024-11-05 21:07:10.843952",
"spec_repo_commit": "6c0fa1b6"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-05 20:16:44.222969",
"spec_repo_commit": "1a56bfda"
"regenerated": "2024-11-05 21:07:10.862374",
"spec_repo_commit": "6c0fa1b6"
}
}
}
12 changes: 0 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35699,12 +35699,6 @@ paths:
operator: OR
permissions:
- timeseries_query
x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring
(RUM), Cloud Cost Management, and Log Management data sources.

We are gradually onboarding support for more sources. If you have any

feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
/api/v2/query/timeseries:
post:
description: 'Query timeseries data across various data sources and
Expand Down Expand Up @@ -35745,12 +35739,6 @@ paths:
operator: OR
permissions:
- timeseries_query
x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring
(RUM), Cloud Cost Management, and Log Management data sources.

We are gradually onboarding support for more sources. If you have any

feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
/api/v2/remote_config/products/cws/agent_rules:
get:
description: Get the list of Cloud Security Management Threats Agent rules.
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryScalarData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.queryScalarData"] = true;
const apiInstance = new v2.MetricsApi(configuration);

const params: v2.MetricsApiQueryScalarDataRequest = {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryScalarData_3112571352.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.queryScalarData"] = true;
const apiInstance = new v2.MetricsApi(configuration);

const params: v2.MetricsApiQueryScalarDataRequest = {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryTimeseriesData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.queryTimeseriesData"] = true;
const apiInstance = new v2.MetricsApi(configuration);

const params: v2.MetricsApiQueryTimeseriesDataRequest = {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryTimeseriesData_301142940.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.queryTimeseriesData"] = true;
const apiInstance = new v2.MetricsApi(configuration);

const params: v2.MetricsApiQueryTimeseriesDataRequest = {
Expand Down
8 changes: 0 additions & 8 deletions features/v2/metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query scalar data across multiple products returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
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"}}
When the request is sent
Expand All @@ -255,7 +254,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query scalar data across multiple products returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
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"}}
When the request is sent
Expand All @@ -264,7 +262,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query timeseries data across multiple products returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
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"}}
When the request is sent
Expand All @@ -273,7 +270,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query timeseries data across multiple products returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
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"}}
When the request is sent
Expand All @@ -300,7 +296,6 @@ Feature: Metrics
@team:Datadog/timeseries-query
Scenario: Scalar cross product query returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
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"}}
When the request is sent
Expand All @@ -309,7 +304,6 @@ Feature: Metrics
@team:Datadog/timeseries-query
Scenario: Scalar cross product query returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
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"}}
When the request is sent
Expand Down Expand Up @@ -374,7 +368,6 @@ Feature: Metrics
@skip @team:Datadog/timeseries-query
Scenario: Timeseries cross product query returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
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"}}
When the request is sent
Expand All @@ -383,7 +376,6 @@ Feature: Metrics
@team:Datadog/timeseries-query
Scenario: Timeseries cross product query returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
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"}}
When the request is sent
Expand Down
2 changes: 0 additions & 2 deletions packages/datadog-api-client-common/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,6 @@ export function createConfiguration(
"v2.updateIncidentIntegration": false,
"v2.updateIncidentTodo": false,
"v2.updateIncidentType": false,
"v2.queryScalarData": false,
"v2.queryTimeseriesData": false,
"v2.getFinding": false,
"v2.listFindings": false,
"v2.muteFindings": false,
Expand Down
10 changes: 0 additions & 10 deletions packages/datadog-api-client-v2/apis/MetricsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,6 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory {
): Promise<RequestContext> {
const _config = _options || this.configuration;

logger.warn("Using unstable operation 'queryScalarData'");
if (!_config.unstableOperations["v2.queryScalarData"]) {
throw new Error("Unstable operation 'queryScalarData' is disabled");
}

// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError("body", "queryScalarData");
Expand Down Expand Up @@ -602,11 +597,6 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory {
): Promise<RequestContext> {
const _config = _options || this.configuration;

logger.warn("Using unstable operation 'queryTimeseriesData'");
if (!_config.unstableOperations["v2.queryTimeseriesData"]) {
throw new Error("Unstable operation 'queryTimeseriesData' is disabled");
}

// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError("body", "queryTimeseriesData");
Expand Down

0 comments on commit 3a1bfd5

Please sign in to comment.