Skip to content

Commit b3d1e45

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8c9b068 of spec repo
1 parent 1225fcc commit b3d1e45

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116096,12 +116096,22 @@ paths:
116096116096
/api/v2/metrics/{metric_name}/volumes:
116097116097
get:
116098116098
description: |-
116099-
View distinct metrics volumes for the given metric name.
116099+
View hourly average metric volumes for the given metric name over the look back period.
116100116100

116101116101
Custom metrics generated in-app from other products will return `null` for ingested volumes.
116102116102
operationId: ListVolumesByMetricName
116103116103
parameters:
116104116104
- $ref: "#/components/parameters/MetricName"
116105+
- description: |-
116106+
The number of seconds of look back (from now).
116107+
Default value is 3,600 (1 hour), maximum value is 2,592,000 (1 month).
116108+
example: 7200
116109+
in: query
116110+
name: window[seconds]
116111+
required: false
116112+
schema:
116113+
format: int64
116114+
type: integer
116105116115
responses:
116106116116
"200":
116107116117
content:

src/datadog_api_client/v2/api/metrics_api.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,11 @@ def __init__(self, api_client=None):
469469
"attribute": "metric_name",
470470
"location": "path",
471471
},
472+
"window_seconds": {
473+
"openapi_types": (int,),
474+
"attribute": "window[seconds]",
475+
"location": "query",
476+
},
472477
},
473478
headers_map={
474479
"accept": ["application/json"],
@@ -1012,20 +1017,28 @@ def list_tags_by_metric_name(
10121017
def list_volumes_by_metric_name(
10131018
self,
10141019
metric_name: str,
1020+
*,
1021+
window_seconds: Union[int, UnsetType] = unset,
10151022
) -> MetricVolumesResponse:
10161023
"""List distinct metric volumes by metric name.
10171024
1018-
View distinct metrics volumes for the given metric name.
1025+
View hourly average metric volumes for the given metric name over the look back period.
10191026
10201027
Custom metrics generated in-app from other products will return ``null`` for ingested volumes.
10211028
10221029
:param metric_name: The name of the metric.
10231030
:type metric_name: str
1031+
:param window_seconds: The number of seconds of look back (from now).
1032+
Default value is 3,600 (1 hour), maximum value is 2,592,000 (1 month).
1033+
:type window_seconds: int, optional
10241034
:rtype: MetricVolumesResponse
10251035
"""
10261036
kwargs: Dict[str, Any] = {}
10271037
kwargs["metric_name"] = metric_name
10281038

1039+
if window_seconds is not unset:
1040+
kwargs["window_seconds"] = window_seconds
1041+
10291042
return self._list_volumes_by_metric_name_endpoint.call_with_http_info(**kwargs)
10301043

10311044
def query_scalar_data(

0 commit comments

Comments
 (0)