Skip to content

Document extra parameter for metric volumes endpoint #2661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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.6",
"regenerated": "2025-06-26 17:56:18.417997",
"spec_repo_commit": "76086f13"
"regenerated": "2025-06-30 08:48:25.992275",
"spec_repo_commit": "36849030"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-26 17:56:18.433709",
"spec_repo_commit": "76086f13"
"regenerated": "2025-06-30 08:48:26.088686",
"spec_repo_commit": "36849030"
}
}
}
11 changes: 11 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52633,6 +52633,17 @@ paths:
operationId: ListVolumesByMetricName
parameters:
- $ref: '#/components/parameters/MetricName'
- description: 'The number of seconds of look back (from now).

Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum
value is 2,630,000 (1 month).'
example: 7200
in: query
name: window[seconds]
required: false
schema:
format: int64
type: integer
responses:
'200':
content:
Expand Down
13 changes: 13 additions & 0 deletions src/datadog_api_client/v2/api/metrics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ def __init__(self, api_client=None):
"attribute": "metric_name",
"location": "path",
},
"window_seconds": {
"openapi_types": (int,),
"attribute": "window[seconds]",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -881,6 +886,8 @@ def list_tags_by_metric_name(
def list_volumes_by_metric_name(
self,
metric_name: str,
*,
window_seconds: Union[int, UnsetType] = unset,
) -> MetricVolumesResponse:
"""List distinct metric volumes by metric name.

Expand All @@ -890,11 +897,17 @@ def list_volumes_by_metric_name(

:param metric_name: The name of the metric.
:type metric_name: str
:param window_seconds: The number of seconds of look back (from now).
Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month).
:type window_seconds: int, optional
:rtype: MetricVolumesResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["metric_name"] = metric_name

if window_seconds is not unset:
kwargs["window_seconds"] = window_seconds

return self._list_volumes_by_metric_name_endpoint.call_with_http_info(**kwargs)

def query_scalar_data(
Expand Down
Loading