diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0bf14e17433..ba7d60b2b1e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -214873,6 +214873,11 @@ paths: To compare current volumes across many metrics, use `GET /api/v2/metrics` with `include=metric_volumes` instead of calling this endpoint for each metric. + + A `404 Not Found` response means that no metric with this name exists in your organization. A + `400 Bad Request` response means that a query parameter is invalid, or that the metric has no data in the + queried window. For no data, the error message says so and names the window that was queried, which can + differ from the requested one. operationId: EstimateMetricsOutputSeries parameters: - $ref: "#/components/parameters/MetricName" @@ -214894,7 +214899,7 @@ paths: type: boolean - description: |- The number of hours of look back (from now) to estimate cardinality with. - If unspecified, it defaults to 0 hours (the most recent data). + If unspecified, it defaults to 0 hours (the most recent data). Values below 0 return `400 Bad Request`. example: 0 in: query name: filter[hours_ago] @@ -214920,7 +214925,9 @@ paths: required: false schema: type: boolean - - description: A window, in hours, from the look back to estimate cardinality with. The minimum and default is 1 hour. + - description: |- + A window, in hours, from the look back to estimate cardinality with. The minimum and default is 1 hour. + Smaller values return `400 Bad Request`. example: 6 in: query name: filter[timespan_h] @@ -214928,6 +214935,7 @@ paths: schema: format: int32 maximum: 2147483647 + minimum: 1 type: integer responses: "200": @@ -215398,9 +215406,9 @@ paths: description: |- Returns the tag configuration for the given metric name. - A metric may exist and submit data without having a tag configuration. A `404 Not Found` response usually - means that the metric has no tag configuration, but it is also returned when no metric with this name exists - in your organization. + A metric may exist and submit data without having a tag configuration. Both cases return `404 Not Found`, + with different messages: `No tag configuration for ` when the metric exists without a tag + configuration, and ` not found` when no metric with this name exists in your organization. To list tag configurations for many metrics, use `GET /api/v2/metrics` with `filter[configured]=true` instead of calling this endpoint for each metric. diff --git a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java index 8e6d2b5870e..b9de7b8ba09 100644 --- a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java @@ -1642,7 +1642,8 @@ public EstimateMetricsOutputSeriesOptionalParameters filterExcludeTagsMode( * Set filterHoursAgo. * * @param filterHoursAgo The number of hours of look back (from now) to estimate cardinality - * with. If unspecified, it defaults to 0 hours (the most recent data). (optional) + * with. If unspecified, it defaults to 0 hours (the most recent data). Values below 0 + * return 400 Bad Request. (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ public EstimateMetricsOutputSeriesOptionalParameters filterHoursAgo(Integer filterHoursAgo) { @@ -1678,7 +1679,8 @@ public EstimateMetricsOutputSeriesOptionalParameters filterPct(Boolean filterPct * Set filterTimespanH. * * @param filterTimespanH A window, in hours, from the look back to estimate cardinality with. - * The minimum and default is 1 hour. (optional) + * The minimum and default is 1 hour. Smaller values return 400 Bad Request. + * (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ public EstimateMetricsOutputSeriesOptionalParameters filterTimespanH(Integer filterTimespanH) { @@ -1761,6 +1763,11 @@ public CompletableFuture estimateMetricsOutputSeriesAsyn *

To compare current volumes across many metrics, use GET /api/v2/metrics with * include=metric_volumes instead of calling this endpoint for each metric. * + *

A 404 Not Found response means that no metric with this name exists in your + * organization. A 400 Bad Request response means that a query parameter is invalid, + * or that the metric has no data in the queried window. For no data, the error message says so + * and names the window that was queried, which can differ from the requested one. + * * @param metricName The name of the metric. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<MetricEstimateResponse> @@ -3050,9 +3057,11 @@ public CompletableFuture listTagConfigurationByN /** * Returns the tag configuration for the given metric name. * - *

A metric may exist and submit data without having a tag configuration. A 404 Not Found - * response usually means that the metric has no tag configuration, but it is also - * returned when no metric with this name exists in your organization. + *

A metric may exist and submit data without having a tag configuration. Both cases return + * 404 Not Found, with different messages: + * No tag configuration for <metric_name> when the metric exists without a tag + * configuration, and <metric_name> not found when no metric with this name + * exists in your organization. * *

To list tag configurations for many metrics, use GET /api/v2/metrics with * filter[configured]=true instead of calling this endpoint for each metric.