Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4",
"regenerated": "2023-05-25 19:51:58.110605",
"spec_repo_commit": "e4c04414"
"regenerated": "2023-05-26 16:53:11.909073",
"spec_repo_commit": "fa84acd1"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-25 19:51:58.127182",
"spec_repo_commit": "e4c04414"
"regenerated": "2023-05-26 16:53:11.930239",
"spec_repo_commit": "fa84acd1"
}
}
}
2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18752,7 +18752,7 @@ paths:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Too Many Requests
summary: Configure tags for multiple metrics
summary: Delete tags for multiple metrics
tags:
- Metrics
x-codegen-request-body-name: body
Expand Down
29 changes: 29 additions & 0 deletions examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Delete tags for multiple metrics returns "Accepted" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.MetricsApi(configuration);

const params: v2.MetricsApiDeleteBulkTagsMetricsConfigurationRequest = {
body: {
data: {
attributes: {
emails: ["sue@example.com", "bob@example.com"],
},
id: "kafka.lag",
type: "metric_bulk_configure_tags",
},
},
};

apiInstance
.deleteBulkTagsMetricsConfiguration(params)
.then((data: v2.MetricBulkTagConfigResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
80 changes: 52 additions & 28 deletions features/v2/metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Metrics
Given a valid "apiKeyAuth" key in the system
And an instance of "Metrics" API

@skip-typescript @team:DataDog/points-aggregation
@skip-typescript @team:DataDog/metrics-experience
Scenario: Configure tags for multiple metrics returns "Accepted" response
Given a valid "appKeyAuth" key in the system
And there is a valid "user" in the system
Expand All @@ -22,23 +22,23 @@ Feature: Metrics
When the request is sent
Then the response status is 202 Accepted

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Configure tags for multiple metrics returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "CreateBulkTagsMetricsConfiguration" request
And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"], "tags": ["host", "pod_name", "is_shadow"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Configure tags for multiple metrics returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And new "CreateBulkTagsMetricsConfiguration" request
And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"], "tags": ["host", "pod_name", "is_shadow"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Create a tag configuration returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "CreateTagConfiguration" request
Expand All @@ -47,7 +47,7 @@ Feature: Metrics
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Create a tag configuration returns "Conflict" response
Given a valid "appKeyAuth" key in the system
And new "CreateTagConfiguration" request
Expand All @@ -56,7 +56,7 @@ Feature: Metrics
When the request is sent
Then the response status is 409 Conflict

@replay-only @skip-validation @team:DataDog/points-aggregation
@replay-only @skip-validation @team:DataDog/metrics-experience
Scenario: Create a tag configuration returns "Created" response
Given a valid "appKeyAuth" key in the system
And new "CreateTagConfiguration" request
Expand All @@ -66,7 +66,7 @@ Feature: Metrics
When the request is sent
Then the response status is 201 Created

@replay-only @skip-validation @team:DataDog/points-aggregation
@replay-only @skip-validation @team:DataDog/metrics-experience
Scenario: Delete a tag configuration returns "No Content" response
Given there is a valid "metric" in the system
And there is a valid "metric_tag_configuration" in the system
Expand All @@ -76,30 +76,54 @@ Feature: Metrics
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Delete a tag configuration returns "Not found" response
Given a valid "appKeyAuth" key in the system
And new "DeleteTagConfiguration" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not found

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Delete tags for multiple metrics returns "Accepted" response
Given a valid "appKeyAuth" key in the system
And new "DeleteBulkTagsMetricsConfiguration" request
And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
When the request is sent
Then the response status is 202 Accepted

@generated @skip @team:DataDog/metrics-experience
Scenario: Delete tags for multiple metrics returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "DeleteBulkTagsMetricsConfiguration" request
And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/metrics-experience
Scenario: Delete tags for multiple metrics returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And new "DeleteBulkTagsMetricsConfiguration" request
And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/metrics-experience
Scenario: Get a list of metrics returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "ListTagConfigurations" request
When the request is sent
Then the response status is 400 Bad Request

@skip @team:DataDog/points-aggregation
@skip @team:DataDog/metrics-experience
Scenario: Get a list of metrics returns "Success" response
Given a valid "appKeyAuth" key in the system
And there is a valid "metric_tag_configuration" in the system
And new "ListTagConfigurations" request
When the request is sent
Then the response status is 200 Success

@team:DataDog/points-aggregation
@team:DataDog/metrics-experience
Scenario: Get a list of metrics with a tag filter returns "Success" response
Given a valid "appKeyAuth" key in the system
And new "ListTagConfigurations" request
Expand All @@ -108,7 +132,7 @@ Feature: Metrics
Then the response status is 200 Success
And the response "data" has length 0

@team:DataDog/points-aggregation
@team:DataDog/metrics-experience
Scenario: Get a list of metrics with configured filter returns "Success" response
Given a valid "appKeyAuth" key in the system
And new "ListTagConfigurations" request
Expand All @@ -117,23 +141,23 @@ Feature: Metrics
Then the response status is 200 Success
And the response "data[0].type" is equal to "manage_tags"

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: List active tags and aggregations returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "ListActiveMetricConfigurations" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: List active tags and aggregations returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And new "ListActiveMetricConfigurations" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@skip-validation @team:DataDog/points-aggregation
@skip-validation @team:DataDog/metrics-experience
Scenario: List active tags and aggregations returns "Success" response
Given a valid "appKeyAuth" key in the system
And there is a valid "metric" in the system
Expand All @@ -143,23 +167,23 @@ Feature: Metrics
Then the response status is 200 Success
And the response "data.type" is equal to "actively_queried_configurations"

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: List distinct metric volumes by metric name returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "ListVolumesByMetricName" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: List distinct metric volumes by metric name returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And new "ListVolumesByMetricName" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@skip-validation @team:DataDog/points-aggregation
@skip-validation @team:DataDog/metrics-experience
Scenario: List distinct metric volumes by metric name returns "Success" response
Given a valid "appKeyAuth" key in the system
And there is a valid "metric" in the system
Expand All @@ -170,15 +194,15 @@ Feature: Metrics
Then the response status is 200 Success
And the response "data.type" is equal to "metric_volumes"

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: List tag configuration by name returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And new "ListTagConfigurationByName" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@replay-only @skip-validation @team:DataDog/points-aggregation
@replay-only @skip-validation @team:DataDog/metrics-experience
Scenario: List tag configuration by name returns "Success" response
Given a valid "appKeyAuth" key in the system
And there is a valid "metric" in the system
Expand All @@ -189,23 +213,23 @@ Feature: Metrics
Then the response status is 200 Success
And the response "data.id" has the same value as "metric_tag_configuration.data.id"

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: List tags by metric name returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "ListTagsByMetricName" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: List tags by metric name returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And new "ListTagsByMetricName" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@replay-only @skip-validation @team:DataDog/points-aggregation
@replay-only @skip-validation @team:DataDog/metrics-experience
Scenario: List tags by metric name returns "Success" response
Given a valid "appKeyAuth" key in the system
And there is a valid "metric" in the system
Expand Down Expand Up @@ -309,15 +333,15 @@ Feature: Metrics
When the request is sent
Then the response status is 202 Payload accepted

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Tag Configuration Cardinality Estimator returns "API error response." response
Given a valid "appKeyAuth" key in the system
And new "EstimateMetricsOutputSeries" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 API error response.

@replay-only @team:DataDog/points-aggregation
@replay-only @team:DataDog/metrics-experience
Scenario: Tag Configuration Cardinality Estimator returns "Success" response
Given new "EstimateMetricsOutputSeries" request
And request contains "metric_name" parameter with value "system.cpu.idle"
Expand Down Expand Up @@ -346,7 +370,7 @@ Feature: Metrics
And the response "data.type" is equal to "timeseries_response"
And the response "data.attributes.series[0].unit[0].name" is equal to "percent"

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Update a tag configuration returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And new "UpdateTagConfiguration" request
Expand All @@ -355,7 +379,7 @@ Feature: Metrics
When the request is sent
Then the response status is 400 Bad Request

@replay-only @skip-validation @team:DataDog/points-aggregation
@replay-only @skip-validation @team:DataDog/metrics-experience
Scenario: Update a tag configuration returns "OK" response
Given a valid "appKeyAuth" key in the system
And there is a valid "metric" in the system
Expand All @@ -367,7 +391,7 @@ Feature: Metrics
Then the response status is 200 OK
And the response "data.attributes.tags[0]" is equal to "app"

@generated @skip @team:DataDog/points-aggregation
@generated @skip @team:DataDog/metrics-experience
Scenario: Update a tag configuration returns "Unprocessable Entity" response
Given a valid "appKeyAuth" key in the system
And new "UpdateTagConfiguration" request
Expand Down