diff --git a/.apigentools-info b/.apigentools-info index 7dacc43ab51..6d9d852ae6c 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-01 14:05:08.660999", - "spec_repo_commit": "c70ecd2f" + "regenerated": "2023-06-05 14:46:47.877237", + "spec_repo_commit": "060dc917" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-01 14:05:08.676337", - "spec_repo_commit": "c70ecd2f" + "regenerated": "2023-06-05 14:46:47.891094", + "spec_repo_commit": "060dc917" } } } \ No newline at end of file diff --git a/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.frozen b/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.frozen index d2fedd48060..9b7231a9b3a 100644 --- a/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.frozen +++ b/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.frozen @@ -1 +1 @@ -2022-09-01T12:00:27.800Z \ No newline at end of file +2023-06-05T14:44:05.398Z \ No newline at end of file diff --git a/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.yml b/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.yml index 0cbf8c6e8f6..33b7b40c107 100644 --- a/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.yml +++ b/cassettes/features/v2/metrics/List-active-tags-and-aggregations-returns-Success-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 01 Sep 2022 12:00:27 GMT +- recorded_at: Mon, 05 Jun 2023 14:44:05 GMT request: body: encoding: UTF-8 - string: '{"series":[{"metric":"TestListactivetagsandaggregationsreturnsSuccessresponse1662033627","points":[[1662033627,1.1]],"tags":["test:ExampleSubmitmetricsreturnsPayloadacceptedresponse"],"type":"gauge"}]}' + string: '{"series":[{"metric":"static_test_metric_donotdelete","points":[[1685976245,1.1]],"tags":["test:static_test_metric_donotdelete"],"type":"gauge"}]}' headers: Accept: - text/json, application/json @@ -21,18 +21,18 @@ http_interactions: status: code: 202 message: Accepted -- recorded_at: Thu, 01 Sep 2022 12:00:27 GMT +- recorded_at: Mon, 05 Jun 2023 14:44:05 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/metrics/TestListactivetagsandaggregationsreturnsSuccessresponse1662033627/active-configurations + uri: https://api.datadoghq.com/api/v2/metrics/static_test_metric_donotdelete/active-configurations response: body: encoding: UTF-8 - string: '{"data":{"type":"actively_queried_configurations","id":"TestListactivetagsandaggregationsreturnsSuccessresponse1662033627","attributes":{"active_tags":[],"active_aggregations":[]}}} + string: '{"data":{"type":"actively_queried_configurations","id":"static_test_metric_donotdelete","attributes":{"active_tags":[],"active_aggregations":[]}}} ' headers: diff --git a/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.frozen b/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.frozen index 6abb48e4c35..093de134196 100644 --- a/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.frozen +++ b/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.frozen @@ -1 +1 @@ -2022-05-12T11:28:32.184Z \ No newline at end of file +2023-06-02T15:15:47.326Z \ No newline at end of file diff --git a/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.yml b/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.yml index ef0c6863bae..77ffe25f5fe 100644 --- a/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.yml +++ b/cassettes/features/v2/metrics/List-distinct-metric-volumes-by-metric-name-returns-Success-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 12 May 2022 11:28:32 GMT +- recorded_at: Fri, 02 Jun 2023 15:15:47 GMT request: body: encoding: UTF-8 - string: '{"series":[{"metric":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912","points":[[1652354912,1.1]],"tags":["test:ExampleSubmitmetricsreturnsPayloadacceptedresponse"],"type":"gauge"}]}' + string: '{"series":[{"metric":"static_test_metric_donotdelete","points":[[1685718947,1.1]],"tags":["test:static_test_metric_donotdelete"],"type":"gauge"}]}' headers: Accept: - text/json, application/json @@ -21,60 +21,24 @@ http_interactions: status: code: 202 message: Accepted -- recorded_at: Thu, 12 May 2022 11:28:32 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"metric_type":"gauge","tags":["app","datacenter","TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912"]},"id":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912","type":"manage_tags"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/metrics/TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912/tags - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"manage_tags","id":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912","attributes":{"tags":["TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912","app","datacenter"],"created_at":"2022-05-12T11:28:37.078639+00:00","modified_at":"2022-05-12T11:28:37.078639+00:00","metric_type":"gauge","aggregations":[{"space":"avg","time":"avg"}]}}}' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Thu, 12 May 2022 11:28:32 GMT +- recorded_at: Fri, 02 Jun 2023 15:15:47 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/metrics/TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912/volumes + uri: https://api.datadoghq.com/api/v2/metrics/static_test_metric_donotdelete/volumes response: body: encoding: UTF-8 - string: '{"data":{"type":"metric_volumes","id":"TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912","attributes":{"indexed_volume":1,"ingested_volume":1}}}' + string: '{"data":{"type":"metric_volumes","id":"static_test_metric_donotdelete","attributes":{"indexed_volume":1,"ingested_volume":1}}} + + ' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Thu, 12 May 2022 11:28:32 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/metrics/TestListdistinctmetricvolumesbymetricnamereturnsSuccessresponse1652354912/tags - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content recorded_with: VCR 6.0.0 diff --git a/examples/v2/metrics/ListActiveMetricConfigurations.rb b/examples/v2/metrics/ListActiveMetricConfigurations.rb index 17fd43998b9..dee02130f19 100644 --- a/examples/v2/metrics/ListActiveMetricConfigurations.rb +++ b/examples/v2/metrics/ListActiveMetricConfigurations.rb @@ -2,4 +2,4 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V2::MetricsAPI.new -p api_instance.list_active_metric_configurations("ExampleMetric") +p api_instance.list_active_metric_configurations("static_test_metric_donotdelete") diff --git a/examples/v2/metrics/ListVolumesByMetricName.rb b/examples/v2/metrics/ListVolumesByMetricName.rb index a17a3e934d0..cb027ff95c3 100644 --- a/examples/v2/metrics/ListVolumesByMetricName.rb +++ b/examples/v2/metrics/ListVolumesByMetricName.rb @@ -2,4 +2,4 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V2::MetricsAPI.new -p api_instance.list_volumes_by_metric_name("ExampleMetric") +p api_instance.list_volumes_by_metric_name("static_test_metric_donotdelete") diff --git a/features/v1/given.json b/features/v1/given.json index 21120d825e6..9f31677b0aa 100644 --- a/features/v1/given.json +++ b/features/v1/given.json @@ -159,6 +159,18 @@ "tag": "Metrics", "operationId": "SubmitMetrics" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"series\": [\n {\n \"metric\": \"static_test_metric_donotdelete\",\n \"type\": \"gauge\",\n \"points\": [\n [\n {{ timestamp(\"now\") }},\n 1.1\n ]\n ],\n \"tags\": [\n \"test:static_test_metric_donotdelete\"\n ]\n }\n ]\n}\n" + } + ], + "step": "there is a valid \"metric_static\" in the system", + "key": "metric_static", + "tag": "Metrics", + "operationId": "SubmitMetrics" + }, { "parameters": [ { diff --git a/features/v1/metric_payload_static.json b/features/v1/metric_payload_static.json new file mode 100644 index 00000000000..28d4fd687e1 --- /dev/null +++ b/features/v1/metric_payload_static.json @@ -0,0 +1,17 @@ +{ + "series": [ + { + "metric": "static_test_metric_donotdelete", + "type": "gauge", + "points": [ + [ + {{ timestamp("now") }}, + 1.1 + ] + ], + "tags": [ + "test:static_test_metric_donotdelete" + ] + } + ] +} diff --git a/features/v2/metrics.feature b/features/v2/metrics.feature index 24b48241cf5..fd725964f10 100644 --- a/features/v2/metrics.feature +++ b/features/v2/metrics.feature @@ -160,12 +160,13 @@ Feature: Metrics @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 + And there is a valid "metric_static" in the system And new "ListActiveMetricConfigurations" request - And request contains "metric_name" parameter with value "{{ unique_alnum }}" + And request contains "metric_name" parameter with value "static_test_metric_donotdelete" When the request is sent Then the response status is 200 Success And the response "data.type" is equal to "actively_queried_configurations" + And the response "data.id" is equal to "static_test_metric_donotdelete" @generated @skip @team:DataDog/metrics-experience Scenario: List distinct metric volumes by metric name returns "Bad Request" response @@ -186,13 +187,13 @@ Feature: Metrics @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 - And there is a valid "metric_tag_configuration" in the system + And there is a valid "metric_static" in the system And new "ListVolumesByMetricName" request - And request contains "metric_name" parameter with value "{{ unique_alnum }}" + And request contains "metric_name" parameter with value "static_test_metric_donotdelete" When the request is sent Then the response status is 200 Success And the response "data.type" is equal to "metric_volumes" + And the response "data.id" is equal to "static_test_metric_donotdelete" @generated @skip @team:DataDog/metrics-experience Scenario: List tag configuration by name returns "Not Found" response