Skip to content

Commit d960189

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add new param to api/v2/metrics (#3754)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 0b1b1ea commit d960189

2 files changed

Lines changed: 40 additions & 10 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88653,6 +88653,26 @@ paths:
8865388653
required: false
8865488654
schema:
8865588655
type: boolean
88656+
- description: 'The number of seconds of look back (from now) used by the `filter[queried]`
88657+
filter logic.
88658+
88659+
Must be sent with `filter[queried]` and is only applied when `filter[queried]=true`.
88660+
88661+
If `filter[queried]=false`, this parameter is ignored and default queried-window
88662+
behavior applies.
88663+
88664+
If `filter[queried]` is not provided, sending this parameter returns a 400.
88665+
88666+
For example: `GET /api/v2/metrics?filter[queried]=true&filter[queried][window][seconds]=7776000`.'
88667+
example: 7776000
88668+
in: query
88669+
name: filter[queried][window][seconds]
88670+
required: false
88671+
schema:
88672+
format: int64
88673+
maximum: 15552000
88674+
minimum: 0
88675+
type: integer
8865688676
- description: 'Filter metrics that have been submitted with the given tags.
8865788677
Supports boolean and wildcard expressions.
8865888678

api/datadogV2/api_metrics.go

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -826,16 +826,17 @@ func (a *MetricsApi) ListTagConfigurationByName(ctx _context.Context, metricName
826826

827827
// ListTagConfigurationsOptionalParameters holds optional parameters for ListTagConfigurations.
828828
type ListTagConfigurationsOptionalParameters struct {
829-
FilterConfigured *bool
830-
FilterTagsConfigured *string
831-
FilterMetricType *MetricTagConfigurationMetricTypeCategory
832-
FilterIncludePercentiles *bool
833-
FilterQueried *bool
834-
FilterTags *string
835-
FilterRelatedAssets *bool
836-
WindowSeconds *int64
837-
PageSize *int32
838-
PageCursor *string
829+
FilterConfigured *bool
830+
FilterTagsConfigured *string
831+
FilterMetricType *MetricTagConfigurationMetricTypeCategory
832+
FilterIncludePercentiles *bool
833+
FilterQueried *bool
834+
FilterQueriedWindowSeconds *int64
835+
FilterTags *string
836+
FilterRelatedAssets *bool
837+
WindowSeconds *int64
838+
PageSize *int32
839+
PageCursor *string
839840
}
840841

841842
// NewListTagConfigurationsOptionalParameters creates an empty struct for parameters.
@@ -874,6 +875,12 @@ func (r *ListTagConfigurationsOptionalParameters) WithFilterQueried(filterQuerie
874875
return r
875876
}
876877

878+
// WithFilterQueriedWindowSeconds sets the corresponding parameter name and returns the struct.
879+
func (r *ListTagConfigurationsOptionalParameters) WithFilterQueriedWindowSeconds(filterQueriedWindowSeconds int64) *ListTagConfigurationsOptionalParameters {
880+
r.FilterQueriedWindowSeconds = &filterQueriedWindowSeconds
881+
return r
882+
}
883+
877884
// WithFilterTags sets the corresponding parameter name and returns the struct.
878885
func (r *ListTagConfigurationsOptionalParameters) WithFilterTags(filterTags string) *ListTagConfigurationsOptionalParameters {
879886
r.FilterTags = &filterTags
@@ -949,6 +956,9 @@ func (a *MetricsApi) ListTagConfigurations(ctx _context.Context, o ...ListTagCon
949956
if optionalParams.FilterQueried != nil {
950957
localVarQueryParams.Add("filter[queried]", datadog.ParameterToString(*optionalParams.FilterQueried, ""))
951958
}
959+
if optionalParams.FilterQueriedWindowSeconds != nil {
960+
localVarQueryParams.Add("filter[queried][window][seconds]", datadog.ParameterToString(*optionalParams.FilterQueriedWindowSeconds, ""))
961+
}
952962
if optionalParams.FilterTags != nil {
953963
localVarQueryParams.Add("filter[tags]", datadog.ParameterToString(*optionalParams.FilterTags, ""))
954964
}

0 commit comments

Comments
 (0)