Skip to content

Commit 61082ee

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 23b5e7e of spec repo (#2931)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3c5860e commit 61082ee

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32563,7 +32563,11 @@ paths:
3256332563
- timeseries_query
3256432564
/api/v1/search:
3256532565
get:
32566-
description: Search for metrics from the last 24 hours in Datadog.
32566+
deprecated: true
32567+
description: '**Note**: This endpoint is deprecated. Use `/api/v2/metrics` instead.
32568+
32569+
32570+
Search for metrics from the last 24 hours in Datadog.'
3256732571
operationId: ListMetrics
3256832572
parameters:
3256932573
- description: Query string to search metrics upon. Can optionally be prefixed

src/datadog_api_client/v1/api/metrics_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
from typing import Any, Dict, Union
7+
import warnings
78

89
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
910
from datadog_api_client.configuration import Configuration
@@ -289,7 +290,9 @@ def list_metrics(
289290
self,
290291
q: str,
291292
) -> MetricSearchResponse:
292-
"""Search metrics.
293+
"""Search metrics. **Deprecated**.
294+
295+
**Note** : This endpoint is deprecated. Use ``/api/v2/metrics`` instead.
293296
294297
Search for metrics from the last 24 hours in Datadog.
295298
@@ -300,6 +303,7 @@ def list_metrics(
300303
kwargs: Dict[str, Any] = {}
301304
kwargs["q"] = q
302305

306+
warnings.warn("list_metrics is deprecated", DeprecationWarning, stacklevel=2)
303307
return self._list_metrics_endpoint.call_with_http_info(**kwargs)
304308

305309
def query_metrics(

0 commit comments

Comments
 (0)