diff --git a/.apigentools-info b/.apigentools-info index 116fa85e200c..69ead1ba0105 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-06 14:57:03.417529", - "spec_repo_commit": "3c39fb0c" + "regenerated": "2025-02-06 17:59:38.553956", + "spec_repo_commit": "b89b292b" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-06 14:57:03.432901", - "spec_repo_commit": "3c39fb0c" + "regenerated": "2025-02-06 17:59:38.570636", + "spec_repo_commit": "b89b292b" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d5fbf684de49..194508f81c84 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -40196,7 +40196,7 @@ paths: required: false schema: type: boolean - - description: '(Beta) Filter custom metrics that have or have not been queried + - description: '(Preview) Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of @@ -40217,6 +40217,14 @@ paths: required: false schema: type: string + - description: (Preview) Filter metrics that are used in dashboards, monitors, + notebooks, SLOs. + example: true + in: query + name: filter[related_assets] + required: false + schema: + type: boolean - description: 'The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index d5946b14621b..b8a13711ad4c 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -4683,6 +4683,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { "type": "string", "format": "", }, + "filterRelatedAssets": { + "type": "boolean", + "format": "", + }, "windowSeconds": { "type": "number", "format": "int64", diff --git a/packages/datadog-api-client-v2/apis/MetricsApi.ts b/packages/datadog-api-client-v2/apis/MetricsApi.ts index 1e3b0f1cd0c3..1e369d6f7873 100644 --- a/packages/datadog-api-client-v2/apis/MetricsApi.ts +++ b/packages/datadog-api-client-v2/apis/MetricsApi.ts @@ -403,6 +403,7 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { filterIncludePercentiles?: boolean, filterQueried?: boolean, filterTags?: string, + filterRelatedAssets?: boolean, windowSeconds?: number, pageSize?: number, pageCursor?: string, @@ -467,6 +468,13 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { "" ); } + if (filterRelatedAssets !== undefined) { + requestContext.setQueryParam( + "filter[related_assets]", + ObjectSerializer.serialize(filterRelatedAssets, "boolean", ""), + "" + ); + } if (windowSeconds !== undefined) { requestContext.setQueryParam( "window[seconds]", @@ -1817,7 +1825,7 @@ export interface MetricsApiListTagConfigurationsRequest { */ filterIncludePercentiles?: boolean; /** - * (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds]. + * (Preview) Filter custom metrics that have or have not been queried in the specified window[seconds]. * If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied. * @type boolean */ @@ -1828,6 +1836,11 @@ export interface MetricsApiListTagConfigurationsRequest { * @type string */ filterTags?: string; + /** + * (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs. + * @type boolean + */ + filterRelatedAssets?: boolean; /** * The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. * Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days). @@ -2138,6 +2151,7 @@ export class MetricsApi { param.filterIncludePercentiles, param.filterQueried, param.filterTags, + param.filterRelatedAssets, param.windowSeconds, param.pageSize, param.pageCursor, @@ -2172,6 +2186,7 @@ export class MetricsApi { param.filterIncludePercentiles, param.filterQueried, param.filterTags, + param.filterRelatedAssets, param.windowSeconds, param.pageSize, param.pageCursor,