Skip to content

Commit de8ba7f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 71455c7c of spec repo
1 parent df9bcc8 commit de8ba7f

11 files changed

+53
-199
lines changed

.apigentools-info

+4-4
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": "2025-04-14 16:33:14.288032",
8-
"spec_repo_commit": "c0287407"
7+
"regenerated": "2025-04-14 20:11:59.275736",
8+
"spec_repo_commit": "71455c7c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-14 16:33:14.303837",
13-
"spec_repo_commit": "c0287407"
12+
"regenerated": "2025-04-14 20:11:59.292113",
13+
"spec_repo_commit": "71455c7c"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+14-82
Original file line numberDiff line numberDiff line change
@@ -19827,47 +19827,6 @@ components:
1982719827
- time
1982819828
- space
1982919829
type: object
19830-
MetricCustomAggregations:
19831-
description: 'A list of queryable aggregation combinations for a count, rate,
19832-
or gauge metric.
19833-
19834-
By default, count and rate metrics require the (time: sum, space: sum) aggregation
19835-
and
19836-
19837-
Gauge metrics require the (time: avg, space: avg) aggregation.
19838-
19839-
Additional time & space combinations are also available:
19840-
19841-
19842-
- time: avg, space: avg
19843-
19844-
- time: avg, space: max
19845-
19846-
- time: avg, space: min
19847-
19848-
- time: avg, space: sum
19849-
19850-
- time: count, space: sum
19851-
19852-
- time: max, space: max
19853-
19854-
- time: min, space: min
19855-
19856-
- time: sum, space: avg
19857-
19858-
- time: sum, space: sum
19859-
19860-
19861-
Can only be applied to non_distribution metrics that have a `metric_type`
19862-
of `count`, `rate`, or `gauge`.'
19863-
example:
19864-
- space: sum
19865-
time: sum
19866-
- space: sum
19867-
time: count
19868-
items:
19869-
$ref: '#/components/schemas/MetricCustomAggregation'
19870-
type: array
1987119830
MetricCustomSpaceAggregation:
1987219831
description: A space aggregation for use in query.
1987319832
enum:
@@ -20371,9 +20330,6 @@ components:
2037120330
description: Object for a single metric tag configuration.
2037220331
example:
2037320332
attributes:
20374-
aggregations:
20375-
- space: avg
20376-
time: avg
2037720333
created_at: '2020-03-25T09:48:37.463835Z'
2037820334
metric_type: gauge
2037920335
modified_at: '2020-04-25T09:48:37.463835Z'
@@ -20394,8 +20350,6 @@ components:
2039420350
description: Object containing the definition of a metric tag configuration
2039520351
attributes.
2039620352
properties:
20397-
aggregations:
20398-
$ref: '#/components/schemas/MetricCustomAggregations'
2039920353
created_at:
2040020354
description: Timestamp when the tag configuration was created.
2040120355
example: '2020-03-25T09:48:37.463835Z'
@@ -20438,8 +20392,6 @@ components:
2043820392
description: Object containing the definition of a metric tag configuration
2043920393
to be created.
2044020394
properties:
20441-
aggregations:
20442-
$ref: '#/components/schemas/MetricCustomAggregations'
2044320395
exclude_tags_mode:
2044420396
description: 'When set to true, the configuration will exclude the configured
2044520397
tags and include any other submitted tags.
@@ -20549,8 +20501,6 @@ components:
2054920501
description: Object containing the definition of a metric tag configuration
2055020502
to be updated.
2055120503
properties:
20552-
aggregations:
20553-
$ref: '#/components/schemas/MetricCustomAggregations'
2055420504
exclude_tags_mode:
2055520505
description: 'When set to true, the configuration will exclude the configured
2055620506
tags and include any other submitted tags.
@@ -45229,9 +45179,8 @@ paths:
4522945179
- metric_tags_write
4523045180
/api/v2/metrics/{metric_name}/active-configurations:
4523145181
get:
45232-
description: List tags and aggregations that are actively queried on dashboards,
45233-
notebooks, monitors, the Metrics Explorer, and using the API for a given metric
45234-
name.
45182+
description: List tags that are actively queried on dashboards, notebooks, monitors,
45183+
the Metrics Explorer, and using the API for a given metric name.
4523545184
operationId: ListActiveMetricConfigurations
4523645185
parameters:
4523745186
- $ref: '#/components/parameters/MetricName'
@@ -45277,7 +45226,7 @@ paths:
4527745226
schema:
4527845227
$ref: '#/components/schemas/APIErrorResponse'
4527945228
description: Too Many Requests
45280-
summary: List active tags and aggregations
45229+
summary: List active tags
4528145230
tags:
4528245231
- Metrics
4528345232
x-permission:
@@ -45381,9 +45330,8 @@ paths:
4538145330
- Metrics
4538245331
/api/v2/metrics/{metric_name}/estimate:
4538345332
get:
45384-
description: Returns the estimated cardinality for a metric with a given tag,
45385-
percentile and number of aggregations configuration using Metrics without
45386-
Limits™.
45333+
description: Returns the estimated cardinality for a metric with a given tag
45334+
and percentile configuration using Metrics without Limits™.
4538745335
operationId: EstimateMetricsOutputSeries
4538845336
parameters:
4538945337
- $ref: '#/components/parameters/MetricName'
@@ -45405,16 +45353,6 @@ paths:
4540545353
maximum: 2147483647
4540645354
minimum: 49
4540745355
type: integer
45408-
- description: The number of aggregations that a `count`, `rate`, or `gauge`
45409-
metric is configured to use. Max number of aggregation combos is 9.
45410-
example: 1
45411-
in: query
45412-
name: filter[num_aggregations]
45413-
required: false
45414-
schema:
45415-
format: int32
45416-
maximum: 9
45417-
type: integer
4541845356
- description: A boolean, for distribution metrics only, to estimate cardinality
4541945357
if the metric includes additional percentile aggregators.
4542045358
example: true
@@ -45550,13 +45488,10 @@ paths:
4555045488
- metrics_read
4555145489
patch:
4555245490
description: 'Update the tag configuration of a metric or percentile aggregations
45553-
of a distribution metric or custom aggregations
45491+
of a distribution metric. By setting `exclude_tags_mode`
4555445492

45555-
of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true
45556-
the behavior is changed
45557-
45558-
from an allow-list to a deny-list, and tags in the defined list will not be
45559-
queryable.
45493+
to true the behavior is changed from an allow-list to a deny-list, and tags
45494+
in the defined list will not be queryable.
4556045495

4556145496
Can only be used with application keys from users with the `Manage Tags for
4556245497
Metrics` permission. This endpoint requires
@@ -45614,17 +45549,14 @@ paths:
4561445549
description: 'Create and define a list of queryable tag keys for an existing
4561545550
count/gauge/rate/distribution metric.
4561645551

45617-
Optionally, include percentile aggregations on any distribution metric or
45618-
configure custom aggregations
45619-
45620-
on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true
45621-
the behavior is changed
45552+
Optionally, include percentile aggregations on any distribution metric. By
45553+
setting `exclude_tags_mode`
4562245554

45623-
from an allow-list to a deny-list, and tags in the defined list will not be
45624-
queryable.
45555+
to true the behavior is changed from an allow-list to a deny-list, and tags
45556+
in the defined list will not
4562545557

45626-
Can only be used with application keys of users with the `Manage Tags for
45627-
Metrics` permission.'
45558+
be queryable. Can only be used with application keys of users with the `Manage
45559+
Tags for Metrics` permission.'
4562845560
operationId: CreateTagConfiguration
4562945561
parameters:
4563045562
- $ref: '#/components/parameters/MetricName'

examples/v2/metrics/EstimateMetricsOutputSeries.rb

-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
api_instance = DatadogAPIClient::V2::MetricsAPI.new
55
opts = {
66
filter_groups: "app,host",
7-
filter_num_aggregations: 4,
87
}
98
p api_instance.estimate_metrics_output_series("system.cpu.idle", opts)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# List active tags and aggregations returns "Success" response
1+
# List active tags returns "Success" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::MetricsAPI.new
5-
p api_instance.list_active_metric_configurations("static_test_metric_donotdelete")
5+
p api_instance.list_active_metric_configurations("metric_name")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List active tags and aggregations returns "Success" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::MetricsAPI.new
5+
p api_instance.list_active_metric_configurations("static_test_metric_donotdelete")

features/scenarios_model_mapping.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,6 @@
17021702
"metric_name" => "String",
17031703
"filter_groups" => "String",
17041704
"filter_hours_ago" => "Integer",
1705-
"filter_num_aggregations" => "Integer",
17061705
"filter_pct" => "Boolean",
17071706
"filter_timespan_h" => "Integer",
17081707
},

features/v2/metrics.feature

+16-9
Original file line numberDiff line numberDiff line change
@@ -152,32 +152,40 @@ Feature: Metrics
152152
Then the response status is 200 Success
153153
And the response "data[0].type" is equal to "manage_tags"
154154

155+
@skip-validation @team:DataDog/metrics-experience
156+
Scenario: List active tags and aggregations returns "Success" response
157+
Given a valid "appKeyAuth" key in the system
158+
And there is a valid "metric_static" in the system
159+
And new "ListActiveMetricConfigurations" request
160+
And request contains "metric_name" parameter with value "static_test_metric_donotdelete"
161+
When the request is sent
162+
Then the response status is 200 Success
163+
And the response "data.type" is equal to "actively_queried_configurations"
164+
And the response "data.id" is equal to "static_test_metric_donotdelete"
165+
155166
@generated @skip @team:DataDog/metrics-experience
156-
Scenario: List active tags and aggregations returns "Bad Request" response
167+
Scenario: List active tags returns "Bad Request" response
157168
Given a valid "appKeyAuth" key in the system
158169
And new "ListActiveMetricConfigurations" request
159170
And request contains "metric_name" parameter from "REPLACE.ME"
160171
When the request is sent
161172
Then the response status is 400 Bad Request
162173

163174
@generated @skip @team:DataDog/metrics-experience
164-
Scenario: List active tags and aggregations returns "Not Found" response
175+
Scenario: List active tags returns "Not Found" response
165176
Given a valid "appKeyAuth" key in the system
166177
And new "ListActiveMetricConfigurations" request
167178
And request contains "metric_name" parameter from "REPLACE.ME"
168179
When the request is sent
169180
Then the response status is 404 Not Found
170181

171-
@skip-validation @team:DataDog/metrics-experience
172-
Scenario: List active tags and aggregations returns "Success" response
182+
@generated @skip @team:DataDog/metrics-experience
183+
Scenario: List active tags returns "Success" response
173184
Given a valid "appKeyAuth" key in the system
174-
And there is a valid "metric_static" in the system
175185
And new "ListActiveMetricConfigurations" request
176-
And request contains "metric_name" parameter with value "static_test_metric_donotdelete"
186+
And request contains "metric_name" parameter from "REPLACE.ME"
177187
When the request is sent
178188
Then the response status is 200 Success
179-
And the response "data.type" is equal to "actively_queried_configurations"
180-
And the response "data.id" is equal to "static_test_metric_donotdelete"
181189

182190
@generated @skip @team:DataDog/metrics-experience
183191
Scenario: List distinct metric volumes by metric name returns "Bad Request" response
@@ -370,7 +378,6 @@ Feature: Metrics
370378
Given new "EstimateMetricsOutputSeries" request
371379
And request contains "metric_name" parameter with value "system.cpu.idle"
372380
And request contains "filter[groups]" parameter with value "app,host"
373-
And request contains "filter[num_aggregations]" parameter with value 4
374381
When the request is sent
375382
Then the response status is 200 Success
376383

lib/datadog_api_client/v2/api/metrics_api.rb

+9-16
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ def create_tag_configuration(metric_name, body, opts = {})
107107
# Create a tag configuration.
108108
#
109109
# Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric.
110-
# Optionally, include percentile aggregations on any distribution metric or configure custom aggregations
111-
# on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
112-
# from an allow-list to a deny-list, and tags in the defined list will not be queryable.
113-
# Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
110+
# Optionally, include percentile aggregations on any distribution metric. By setting `exclude_tags_mode`
111+
# to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not
112+
# be queryable. Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
114113
#
115114
# @param metric_name [String] The name of the metric.
116115
# @param body [MetricTagConfigurationCreateRequest]
@@ -318,13 +317,12 @@ def estimate_metrics_output_series(metric_name, opts = {})
318317

319318
# Tag Configuration Cardinality Estimator.
320319
#
321-
# Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™.
320+
# Returns the estimated cardinality for a metric with a given tag and percentile configuration using Metrics without Limits™.
322321
#
323322
# @param metric_name [String] The name of the metric.
324323
# @param opts [Hash] the optional parameters
325324
# @option opts [String] :filter_groups Filtered tag keys that the metric is configured to query with.
326325
# @option opts [Integer] :filter_hours_ago The number of hours of look back (from now) to estimate cardinality with. If unspecified, it defaults to 0 hours.
327-
# @option opts [Integer] :filter_num_aggregations The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9.
328326
# @option opts [Boolean] :filter_pct A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators.
329327
# @option opts [Integer] :filter_timespan_h A window, in hours, from the look back to estimate cardinality with. The minimum and default is 1 hour.
330328
# @return [Array<(MetricEstimateResponse, Integer, Hash)>] MetricEstimateResponse data, response status code and response headers
@@ -343,9 +341,6 @@ def estimate_metrics_output_series_with_http_info(metric_name, opts = {})
343341
if @api_client.config.client_side_validation && !opts[:'filter_hours_ago'].nil? && opts[:'filter_hours_ago'] < 49
344342
fail ArgumentError, 'invalid value for "opts[:"filter_hours_ago"]" when calling MetricsAPI.estimate_metrics_output_series, must be greater than or equal to 49.'
345343
end
346-
if @api_client.config.client_side_validation && !opts[:'filter_num_aggregations'].nil? && opts[:'filter_num_aggregations'] > 9
347-
fail ArgumentError, 'invalid value for "opts[:"filter_num_aggregations"]" when calling MetricsAPI.estimate_metrics_output_series, must be smaller than or equal to 9.'
348-
end
349344
if @api_client.config.client_side_validation && !opts[:'filter_timespan_h'].nil? && opts[:'filter_timespan_h'] > 2147483647
350345
fail ArgumentError, 'invalid value for "opts[:"filter_timespan_h"]" when calling MetricsAPI.estimate_metrics_output_series, must be smaller than or equal to 2147483647.'
351346
end
@@ -356,7 +351,6 @@ def estimate_metrics_output_series_with_http_info(metric_name, opts = {})
356351
query_params = opts[:query_params] || {}
357352
query_params[:'filter[groups]'] = opts[:'filter_groups'] if !opts[:'filter_groups'].nil?
358353
query_params[:'filter[hours_ago]'] = opts[:'filter_hours_ago'] if !opts[:'filter_hours_ago'].nil?
359-
query_params[:'filter[num_aggregations]'] = opts[:'filter_num_aggregations'] if !opts[:'filter_num_aggregations'].nil?
360354
query_params[:'filter[pct]'] = opts[:'filter_pct'] if !opts[:'filter_pct'].nil?
361355
query_params[:'filter[timespan_h]'] = opts[:'filter_timespan_h'] if !opts[:'filter_timespan_h'].nil?
362356

@@ -395,17 +389,17 @@ def estimate_metrics_output_series_with_http_info(metric_name, opts = {})
395389
return data, status_code, headers
396390
end
397391

398-
# List active tags and aggregations.
392+
# List active tags.
399393
#
400394
# @see #list_active_metric_configurations_with_http_info
401395
def list_active_metric_configurations(metric_name, opts = {})
402396
data, _status_code, _headers = list_active_metric_configurations_with_http_info(metric_name, opts)
403397
data
404398
end
405399

406-
# List active tags and aggregations.
400+
# List active tags.
407401
#
408-
# List tags and aggregations that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name.
402+
# List tags that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name.
409403
#
410404
# @param metric_name [String] The name of the metric.
411405
# @param opts [Hash] the optional parameters
@@ -1069,9 +1063,8 @@ def update_tag_configuration(metric_name, body, opts = {})
10691063

10701064
# Update a tag configuration.
10711065
#
1072-
# Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
1073-
# of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
1074-
# from an allow-list to a deny-list, and tags in the defined list will not be queryable.
1066+
# Update the tag configuration of a metric or percentile aggregations of a distribution metric. By setting `exclude_tags_mode`
1067+
# to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not be queryable.
10751068
# Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires
10761069
# a tag configuration to be created first.
10771070
#

0 commit comments

Comments
 (0)