diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index bf2effce63..48f45d0bc2 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2962,10 +2962,7 @@ components: data_source: $ref: '#/components/schemas/FormulaAndFunctionEventsDataSource' group_by: - description: Group by options. - items: - $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBy' - type: array + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByConfig' indexes: description: An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. @@ -3037,6 +3034,40 @@ components: required: - facet type: object + FormulaAndFunctionEventQueryGroupByConfig: + description: Group by configuration for a formula and functions events query. + Accepts either a list of facet objects or a flat object that specifies a list + of facet fields. + oneOf: + - $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByList' + - $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByFields' + FormulaAndFunctionEventQueryGroupByFields: + description: Flat group by configuration using multiple event facet fields. + properties: + fields: + description: List of event facets to group by. + example: + - hostname + - service + items: + description: Event facet. + type: string + type: array + limit: + description: Number of groups to return. + example: 10 + format: int64 + type: integer + sort: + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBySort' + required: + - fields + type: object + FormulaAndFunctionEventQueryGroupByList: + description: List of objects used to group by. + items: + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBy' + type: array FormulaAndFunctionEventQueryGroupBySort: description: Options for sorting group by results. properties: diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index b20c86c2ba..016a2aae8f 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -928,6 +928,20 @@ datadog\_api\_client.v1.model.formula\_and\_function\_event\_query\_group\_by mo :members: :show-inheritance: +datadog\_api\_client.v1.model.formula\_and\_function\_event\_query\_group\_by\_config module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.formula_and_function_event_query_group_by_config + :members: + :show-inheritance: + +datadog\_api\_client.v1.model.formula\_and\_function\_event\_query\_group\_by\_fields module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.formula_and_function_event_query_group_by_fields + :members: + :show-inheritance: + datadog\_api\_client.v1.model.formula\_and\_function\_event\_query\_group\_by\_sort module ------------------------------------------------------------------------------------------ diff --git a/examples/v1/dashboards/CreateDashboard_1024858348.py b/examples/v1/dashboards/CreateDashboard_1024858348.py index 8e9895050a..aefb09f82a 100644 --- a/examples/v1/dashboards/CreateDashboard_1024858348.py +++ b/examples/v1/dashboards/CreateDashboard_1024858348.py @@ -55,7 +55,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.SCALAR, diff --git a/examples/v1/dashboards/CreateDashboard_1307120899.py b/examples/v1/dashboards/CreateDashboard_1307120899.py index 3fbbef0b5f..4ff58eb8d7 100644 --- a/examples/v1/dashboards/CreateDashboard_1307120899.py +++ b/examples/v1/dashboards/CreateDashboard_1307120899.py @@ -69,7 +69,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.TIMESERIES, diff --git a/examples/v1/dashboards/CreateDashboard_2064651578.py b/examples/v1/dashboards/CreateDashboard_2064651578.py index 30d4a0e328..8a80841b8a 100644 --- a/examples/v1/dashboards/CreateDashboard_2064651578.py +++ b/examples/v1/dashboards/CreateDashboard_2064651578.py @@ -64,7 +64,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.SCALAR, diff --git a/examples/v1/dashboards/CreateDashboard_2490110261.py b/examples/v1/dashboards/CreateDashboard_2490110261.py index 7a0ebfd245..282951688a 100644 --- a/examples/v1/dashboards/CreateDashboard_2490110261.py +++ b/examples/v1/dashboards/CreateDashboard_2490110261.py @@ -47,7 +47,6 @@ indexes=[ "*", ], - group_by=[], ), ], ), diff --git a/examples/v1/dashboards/CreateDashboard_2800096921.py b/examples/v1/dashboards/CreateDashboard_2800096921.py index cb085e56a0..64e1c33aeb 100644 --- a/examples/v1/dashboards/CreateDashboard_2800096921.py +++ b/examples/v1/dashboards/CreateDashboard_2800096921.py @@ -70,7 +70,6 @@ aggregation=FormulaAndFunctionEventAggregation.COUNT, metric="@ci.queue_time", ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.TIMESERIES, diff --git a/examples/v1/dashboards/CreateDashboard_3066042014.py b/examples/v1/dashboards/CreateDashboard_3066042014.py index b449de3fd3..9a5053149a 100644 --- a/examples/v1/dashboards/CreateDashboard_3066042014.py +++ b/examples/v1/dashboards/CreateDashboard_3066042014.py @@ -77,7 +77,6 @@ aggregation=FormulaAndFunctionEventAggregation.COUNT, metric="@ci.queue_time", ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.TIMESERIES, diff --git a/examples/v1/dashboards/CreateDashboard_3451918078.py b/examples/v1/dashboards/CreateDashboard_3451918078.py index c7f4336650..dad8edc4c6 100644 --- a/examples/v1/dashboards/CreateDashboard_3451918078.py +++ b/examples/v1/dashboards/CreateDashboard_3451918078.py @@ -76,7 +76,6 @@ aggregation=FormulaAndFunctionEventAggregation.COUNT, metric="@ci.queue_time", ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.TIMESERIES, diff --git a/examples/v1/dashboards/CreateDashboard_3669695268.py b/examples/v1/dashboards/CreateDashboard_3669695268.py index f32bad0e3a..c9c60dd7d9 100644 --- a/examples/v1/dashboards/CreateDashboard_3669695268.py +++ b/examples/v1/dashboards/CreateDashboard_3669695268.py @@ -51,7 +51,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], storage="online_archives", ), ], diff --git a/examples/v1/dashboards/CreateDashboard_3882428227.py b/examples/v1/dashboards/CreateDashboard_3882428227.py index 3c0a8c2d56..16789da22d 100644 --- a/examples/v1/dashboards/CreateDashboard_3882428227.py +++ b/examples/v1/dashboards/CreateDashboard_3882428227.py @@ -65,7 +65,6 @@ indexes=[ "*", ], - group_by=[], ), request_type=WidgetHistogramRequestType.HISTOGRAM, ), diff --git a/examples/v1/dashboards/CreateDashboard_4018282928.py b/examples/v1/dashboards/CreateDashboard_4018282928.py new file mode 100644 index 0000000000..27daf9de30 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_4018282928.py @@ -0,0 +1,77 @@ +""" +Create a new dashboard with formulas and functions events query using flat group by fields +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v1.api.dashboards_api import DashboardsApi +from datadog_api_client.v1.model.dashboard import Dashboard +from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType +from datadog_api_client.v1.model.formula_and_function_event_aggregation import FormulaAndFunctionEventAggregation +from datadog_api_client.v1.model.formula_and_function_event_query_definition import ( + FormulaAndFunctionEventQueryDefinition, +) +from datadog_api_client.v1.model.formula_and_function_event_query_definition_compute import ( + FormulaAndFunctionEventQueryDefinitionCompute, +) +from datadog_api_client.v1.model.formula_and_function_event_query_definition_search import ( + FormulaAndFunctionEventQueryDefinitionSearch, +) +from datadog_api_client.v1.model.formula_and_function_event_query_group_by_fields import ( + FormulaAndFunctionEventQueryGroupByFields, +) +from datadog_api_client.v1.model.formula_and_function_events_data_source import FormulaAndFunctionEventsDataSource +from datadog_api_client.v1.model.formula_and_function_response_format import FormulaAndFunctionResponseFormat +from datadog_api_client.v1.model.timeseries_widget_definition import TimeseriesWidgetDefinition +from datadog_api_client.v1.model.timeseries_widget_definition_type import TimeseriesWidgetDefinitionType +from datadog_api_client.v1.model.timeseries_widget_request import TimeseriesWidgetRequest +from datadog_api_client.v1.model.widget import Widget +from datadog_api_client.v1.model.widget_layout import WidgetLayout + +body = Dashboard( + title="Example-Dashboard with events flat group_by fields", + widgets=[ + Widget( + definition=TimeseriesWidgetDefinition( + type=TimeseriesWidgetDefinitionType.TIMESERIES, + requests=[ + TimeseriesWidgetRequest( + response_format=FormulaAndFunctionResponseFormat.TIMESERIES, + queries=[ + FormulaAndFunctionEventQueryDefinition( + data_source=FormulaAndFunctionEventsDataSource.EVENTS, + name="query1", + search=FormulaAndFunctionEventQueryDefinitionSearch( + query="", + ), + compute=FormulaAndFunctionEventQueryDefinitionCompute( + aggregation=FormulaAndFunctionEventAggregation.COUNT, + ), + group_by=FormulaAndFunctionEventQueryGroupByFields( + fields=[ + "service", + "host", + ], + limit=10, + ), + ), + ], + ), + ], + ), + layout=WidgetLayout( + x=0, + y=0, + width=4, + height=2, + ), + ), + ], + layout_type=DashboardLayoutType.ORDERED, +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DashboardsApi(api_client) + response = api_instance.create_dashboard(body=body) + + print(response) diff --git a/examples/v1/dashboards/CreateDashboard_4262729673.py b/examples/v1/dashboards/CreateDashboard_4262729673.py index 70ea0a7ae5..ea0e403f8b 100644 --- a/examples/v1/dashboards/CreateDashboard_4262729673.py +++ b/examples/v1/dashboards/CreateDashboard_4262729673.py @@ -74,7 +74,6 @@ aggregation=FormulaAndFunctionEventAggregation.COUNT, metric="@ci.queue_time", ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.TIMESERIES, diff --git a/examples/v1/dashboards/CreateDashboard_578885732.py b/examples/v1/dashboards/CreateDashboard_578885732.py index 3358249f25..d7e07feed2 100644 --- a/examples/v1/dashboards/CreateDashboard_578885732.py +++ b/examples/v1/dashboards/CreateDashboard_578885732.py @@ -64,7 +64,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.SCALAR, diff --git a/examples/v1/dashboards/CreateDashboard_607525069.py b/examples/v1/dashboards/CreateDashboard_607525069.py index 09e52f09dd..392154edaf 100644 --- a/examples/v1/dashboards/CreateDashboard_607525069.py +++ b/examples/v1/dashboards/CreateDashboard_607525069.py @@ -69,7 +69,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.TIMESERIES, diff --git a/examples/v1/dashboards/CreateDashboard_732700533.py b/examples/v1/dashboards/CreateDashboard_732700533.py new file mode 100644 index 0000000000..3d4872bf04 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_732700533.py @@ -0,0 +1,74 @@ +""" +Create a new dashboard with formulas and functions events query using facet group by +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v1.api.dashboards_api import DashboardsApi +from datadog_api_client.v1.model.dashboard import Dashboard +from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType +from datadog_api_client.v1.model.formula_and_function_event_aggregation import FormulaAndFunctionEventAggregation +from datadog_api_client.v1.model.formula_and_function_event_query_definition import ( + FormulaAndFunctionEventQueryDefinition, +) +from datadog_api_client.v1.model.formula_and_function_event_query_definition_compute import ( + FormulaAndFunctionEventQueryDefinitionCompute, +) +from datadog_api_client.v1.model.formula_and_function_event_query_definition_search import ( + FormulaAndFunctionEventQueryDefinitionSearch, +) +from datadog_api_client.v1.model.formula_and_function_event_query_group_by import FormulaAndFunctionEventQueryGroupBy +from datadog_api_client.v1.model.formula_and_function_events_data_source import FormulaAndFunctionEventsDataSource +from datadog_api_client.v1.model.formula_and_function_response_format import FormulaAndFunctionResponseFormat +from datadog_api_client.v1.model.timeseries_widget_definition import TimeseriesWidgetDefinition +from datadog_api_client.v1.model.timeseries_widget_definition_type import TimeseriesWidgetDefinitionType +from datadog_api_client.v1.model.timeseries_widget_request import TimeseriesWidgetRequest +from datadog_api_client.v1.model.widget import Widget +from datadog_api_client.v1.model.widget_layout import WidgetLayout + +body = Dashboard( + title="Example-Dashboard with events facet group_by", + widgets=[ + Widget( + definition=TimeseriesWidgetDefinition( + type=TimeseriesWidgetDefinitionType.TIMESERIES, + requests=[ + TimeseriesWidgetRequest( + response_format=FormulaAndFunctionResponseFormat.TIMESERIES, + queries=[ + FormulaAndFunctionEventQueryDefinition( + data_source=FormulaAndFunctionEventsDataSource.EVENTS, + name="query1", + search=FormulaAndFunctionEventQueryDefinitionSearch( + query="", + ), + compute=FormulaAndFunctionEventQueryDefinitionCompute( + aggregation=FormulaAndFunctionEventAggregation.COUNT, + ), + group_by=[ + FormulaAndFunctionEventQueryGroupBy( + facet="service", + limit=10, + ), + ], + ), + ], + ), + ], + ), + layout=WidgetLayout( + x=0, + y=0, + width=4, + height=2, + ), + ), + ], + layout_type=DashboardLayoutType.ORDERED, +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = DashboardsApi(api_client) + response = api_instance.create_dashboard(body=body) + + print(response) diff --git a/examples/v1/dashboards/CreateDashboard_9836563.py b/examples/v1/dashboards/CreateDashboard_9836563.py index 9ee3073b2e..d302224e6e 100644 --- a/examples/v1/dashboards/CreateDashboard_9836563.py +++ b/examples/v1/dashboards/CreateDashboard_9836563.py @@ -68,7 +68,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], ), ], conditional_formats=[ diff --git a/examples/v1/dashboards/CreateDashboard_985012506.py b/examples/v1/dashboards/CreateDashboard_985012506.py index ce78c7685c..6ffcb66279 100644 --- a/examples/v1/dashboards/CreateDashboard_985012506.py +++ b/examples/v1/dashboards/CreateDashboard_985012506.py @@ -69,7 +69,6 @@ compute=FormulaAndFunctionEventQueryDefinitionCompute( aggregation=FormulaAndFunctionEventAggregation.COUNT, ), - group_by=[], ), ], response_format=FormulaAndFunctionResponseFormat.TIMESERIES, diff --git a/src/datadog_api_client/v1/model/distribution_widget_histogram_request_query.py b/src/datadog_api_client/v1/model/distribution_widget_histogram_request_query.py index 17a6620a43..e896fb35bb 100644 --- a/src/datadog_api_client/v1/model/distribution_widget_histogram_request_query.py +++ b/src/datadog_api_client/v1/model/distribution_widget_histogram_request_query.py @@ -36,8 +36,8 @@ def __init__(self, **kwargs): :param compute: Compute options. :type compute: FormulaAndFunctionEventQueryDefinitionCompute - :param group_by: Group by options. - :type group_by: [FormulaAndFunctionEventQueryGroupBy], optional + :param group_by: Group by configuration for a formula and functions events query. Accepts either a list of facet objects or a flat object that specifies a list of facet fields. + :type group_by: FormulaAndFunctionEventQueryGroupByConfig, optional :param indexes: An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. :type indexes: [str], optional diff --git a/src/datadog_api_client/v1/model/formula_and_function_event_query_definition.py b/src/datadog_api_client/v1/model/formula_and_function_event_query_definition.py index ab56c422a8..7ceec8fddc 100644 --- a/src/datadog_api_client/v1/model/formula_and_function_event_query_definition.py +++ b/src/datadog_api_client/v1/model/formula_and_function_event_query_definition.py @@ -18,12 +18,18 @@ FormulaAndFunctionEventQueryDefinitionCompute, ) from datadog_api_client.v1.model.formula_and_function_events_data_source import FormulaAndFunctionEventsDataSource - from datadog_api_client.v1.model.formula_and_function_event_query_group_by import ( - FormulaAndFunctionEventQueryGroupBy, + from datadog_api_client.v1.model.formula_and_function_event_query_group_by_config import ( + FormulaAndFunctionEventQueryGroupByConfig, ) from datadog_api_client.v1.model.formula_and_function_event_query_definition_search import ( FormulaAndFunctionEventQueryDefinitionSearch, ) + from datadog_api_client.v1.model.formula_and_function_event_query_group_by import ( + FormulaAndFunctionEventQueryGroupBy, + ) + from datadog_api_client.v1.model.formula_and_function_event_query_group_by_fields import ( + FormulaAndFunctionEventQueryGroupByFields, + ) class FormulaAndFunctionEventQueryDefinition(ModelNormal): @@ -41,8 +47,8 @@ def openapi_types(_): from datadog_api_client.v1.model.formula_and_function_events_data_source import ( FormulaAndFunctionEventsDataSource, ) - from datadog_api_client.v1.model.formula_and_function_event_query_group_by import ( - FormulaAndFunctionEventQueryGroupBy, + from datadog_api_client.v1.model.formula_and_function_event_query_group_by_config import ( + FormulaAndFunctionEventQueryGroupByConfig, ) from datadog_api_client.v1.model.formula_and_function_event_query_definition_search import ( FormulaAndFunctionEventQueryDefinitionSearch, @@ -52,7 +58,7 @@ def openapi_types(_): "compute": (FormulaAndFunctionEventQueryDefinitionCompute,), "cross_org_uuids": ([str],), "data_source": (FormulaAndFunctionEventsDataSource,), - "group_by": ([FormulaAndFunctionEventQueryGroupBy],), + "group_by": (FormulaAndFunctionEventQueryGroupByConfig,), "indexes": ([str],), "name": (str,), "search": (FormulaAndFunctionEventQueryDefinitionSearch,), @@ -76,7 +82,12 @@ def __init__( data_source: FormulaAndFunctionEventsDataSource, name: str, cross_org_uuids: Union[List[str], UnsetType] = unset, - group_by: Union[List[FormulaAndFunctionEventQueryGroupBy], UnsetType] = unset, + group_by: Union[ + FormulaAndFunctionEventQueryGroupByConfig, + List[FormulaAndFunctionEventQueryGroupBy], + FormulaAndFunctionEventQueryGroupByFields, + UnsetType, + ] = unset, indexes: Union[List[str], UnsetType] = unset, search: Union[FormulaAndFunctionEventQueryDefinitionSearch, UnsetType] = unset, storage: Union[str, UnsetType] = unset, @@ -94,8 +105,8 @@ def __init__( :param data_source: Data source for event platform-based queries. :type data_source: FormulaAndFunctionEventsDataSource - :param group_by: Group by options. - :type group_by: [FormulaAndFunctionEventQueryGroupBy], optional + :param group_by: Group by configuration for a formula and functions events query. Accepts either a list of facet objects or a flat object that specifies a list of facet fields. + :type group_by: FormulaAndFunctionEventQueryGroupByConfig, optional :param indexes: An array of index names to query in the stream. Omit or use ``[]`` to query all indexes at once. :type indexes: [str], optional diff --git a/src/datadog_api_client/v1/model/formula_and_function_event_query_group_by_config.py b/src/datadog_api_client/v1/model/formula_and_function_event_query_group_by_config.py new file mode 100644 index 0000000000..cf28550019 --- /dev/null +++ b/src/datadog_api_client/v1/model/formula_and_function_event_query_group_by_config.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class FormulaAndFunctionEventQueryGroupByConfig(ModelComposed): + def __init__(self, **kwargs): + """ + Group by configuration for a formula and functions events query. Accepts either a list of facet objects or a flat object that specifies a list of facet fields. + + :param fields: List of event facets to group by. + :type fields: [str] + + :param limit: Number of groups to return. + :type limit: int, optional + + :param sort: Options for sorting group by results. + :type sort: FormulaAndFunctionEventQueryGroupBySort, optional + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v1.model.formula_and_function_event_query_group_by import ( + FormulaAndFunctionEventQueryGroupBy, + ) + from datadog_api_client.v1.model.formula_and_function_event_query_group_by_fields import ( + FormulaAndFunctionEventQueryGroupByFields, + ) + + return { + "oneOf": [ + [FormulaAndFunctionEventQueryGroupBy], + FormulaAndFunctionEventQueryGroupByFields, + ], + } diff --git a/src/datadog_api_client/v1/model/formula_and_function_event_query_group_by_fields.py b/src/datadog_api_client/v1/model/formula_and_function_event_query_group_by_fields.py new file mode 100644 index 0000000000..d46d60df1d --- /dev/null +++ b/src/datadog_api_client/v1/model/formula_and_function_event_query_group_by_fields.py @@ -0,0 +1,66 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v1.model.formula_and_function_event_query_group_by_sort import ( + FormulaAndFunctionEventQueryGroupBySort, + ) + + +class FormulaAndFunctionEventQueryGroupByFields(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.formula_and_function_event_query_group_by_sort import ( + FormulaAndFunctionEventQueryGroupBySort, + ) + + return { + "fields": ([str],), + "limit": (int,), + "sort": (FormulaAndFunctionEventQueryGroupBySort,), + } + + attribute_map = { + "fields": "fields", + "limit": "limit", + "sort": "sort", + } + + def __init__( + self_, + fields: List[str], + limit: Union[int, UnsetType] = unset, + sort: Union[FormulaAndFunctionEventQueryGroupBySort, UnsetType] = unset, + **kwargs, + ): + """ + Flat group by configuration using multiple event facet fields. + + :param fields: List of event facets to group by. + :type fields: [str] + + :param limit: Number of groups to return. + :type limit: int, optional + + :param sort: Options for sorting group by results. + :type sort: FormulaAndFunctionEventQueryGroupBySort, optional + """ + if limit is not unset: + kwargs["limit"] = limit + if sort is not unset: + kwargs["sort"] = sort + super().__init__(kwargs) + + self_.fields = fields diff --git a/src/datadog_api_client/v1/model/formula_and_function_query_definition.py b/src/datadog_api_client/v1/model/formula_and_function_query_definition.py index a8228cc0dc..23b6354aaa 100644 --- a/src/datadog_api_client/v1/model/formula_and_function_query_definition.py +++ b/src/datadog_api_client/v1/model/formula_and_function_query_definition.py @@ -36,8 +36,8 @@ def __init__(self, **kwargs): :param compute: Compute options. :type compute: FormulaAndFunctionEventQueryDefinitionCompute - :param group_by: Group by options. - :type group_by: [FormulaAndFunctionEventQueryGroupBy], optional + :param group_by: Group by configuration for a formula and functions events query. Accepts either a list of facet objects or a flat object that specifies a list of facet fields. + :type group_by: FormulaAndFunctionEventQueryGroupByConfig, optional :param indexes: An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. :type indexes: [str], optional diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index 1710446bfc..e9cf8028ab 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -154,6 +154,12 @@ FormulaAndFunctionEventQueryDefinitionSearch, ) from datadog_api_client.v1.model.formula_and_function_event_query_group_by import FormulaAndFunctionEventQueryGroupBy +from datadog_api_client.v1.model.formula_and_function_event_query_group_by_config import ( + FormulaAndFunctionEventQueryGroupByConfig, +) +from datadog_api_client.v1.model.formula_and_function_event_query_group_by_fields import ( + FormulaAndFunctionEventQueryGroupByFields, +) from datadog_api_client.v1.model.formula_and_function_event_query_group_by_sort import ( FormulaAndFunctionEventQueryGroupBySort, ) @@ -1283,6 +1289,8 @@ "FormulaAndFunctionEventQueryDefinitionCompute", "FormulaAndFunctionEventQueryDefinitionSearch", "FormulaAndFunctionEventQueryGroupBy", + "FormulaAndFunctionEventQueryGroupByConfig", + "FormulaAndFunctionEventQueryGroupByFields", "FormulaAndFunctionEventQueryGroupBySort", "FormulaAndFunctionEventsDataSource", "FormulaAndFunctionMetricAggregation", diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.frozen index c35a420f43..6a94d75b43 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.frozen @@ -1 +1 @@ -2024-11-15T19:32:27.384Z \ No newline at end of file +2026-03-02T11:30:42.729Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.yaml index 52aa28d533..6492019d56 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"description":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147","layout_type":"ordered","title":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147","widgets":[{"definition":{"requests":[{"query":{"compute":{"aggregation":"min","metric":"@duration"},"data_source":"events","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}},"request_type":"histogram"}],"show_legend":false,"title":"Events + body: '{"description":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042","layout_type":"ordered","title":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042","widgets":[{"definition":{"requests":[{"query":{"compute":{"aggregation":"min","metric":"@duration"},"data_source":"events","indexes":["*"],"name":"query1","search":{"query":""}},"request_type":"histogram"}],"show_legend":false,"title":"Events Platform - Request latency HOP","title_align":"left","title_size":"16","type":"distribution","xaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"},"yaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"}},"layout":{"height":2,"width":4,"x":0,"y":0}}]}' headers: accept: @@ -11,10 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"p6k-cxc-g8m","title":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147","description":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147","author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/p6k-cxc-g8m/test-createadistributionwidgetusingahistogramrequestcontainingaformulasandfuncti","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"query":{"compute":{"aggregation":"min","metric":"@duration"},"data_source":"events","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}},"request_type":"histogram"}],"show_legend":false,"title":"Events - Platform - Request latency HOP","title_align":"left","title_size":"16","type":"distribution","xaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"},"yaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"}},"layout":{"height":2,"width":4,"x":0,"y":0},"id":8624507873468872}],"notify_list":null,"created_at":"2024-11-15T19:32:27.570354+00:00","modified_at":"2024-11-15T19:32:27.570354+00:00","restricted_roles":[]} - - ' + string: '{"id":"gz8-vqv-w54","title":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042","description":"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042","author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/gz8-vqv-w54/test-createadistributionwidgetusingahistogramrequestcontainingaformulasandfuncti","template_variables":null,"widgets":[{"definition":{"requests":[{"query":{"compute":{"aggregation":"min","metric":"@duration"},"data_source":"events","indexes":["*"],"name":"query1","search":{"query":""}},"request_type":"histogram"}],"show_legend":false,"title":"Events + Platform - Request latency HOP","title_align":"left","title_size":"16","type":"distribution","xaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"},"yaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"}},"layout":{"height":2,"width":4,"x":0,"y":0},"id":4552786651040889}],"notify_list":null,"created_at":"2026-03-02T11:30:42.857797+00:00","modified_at":"2026-03-02T11:30:42.857797+00:00","restricted_roles":[]}' headers: content-type: - application/json @@ -27,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/p6k-cxc-g8m + uri: https://api.datadoghq.com/api/v1/dashboard/gz8-vqv-w54 response: body: - string: '{"deleted_dashboard_id":"p6k-cxc-g8m"} - - ' + string: '{"deleted_dashboard_id":"gz8-vqv-w54"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.frozen index b42d25287e..449f5cd154 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.frozen @@ -1 +1 @@ -2025-12-08T10:46:15.353Z \ No newline at end of file +2026-03-02T11:30:56.185Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.yaml index 7b8ee7899b..4092089d64 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_geomap_widget_with_conditional_formats_and_text_formats.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"description":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[],"template_variables":[],"title":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","widgets":[{"definition":{"requests":[{"conditional_formats":[{"comparator":">","palette":"white_on_green","value":1000}],"formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"@type:session"}}],"response_format":"scalar","sort":{"count":250,"order_by":[{"index":0,"order":"desc","type":"formula"}]}},{"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"query":{"data_source":"logs_stream","indexes":[],"query_string":"","storage":"hot"},"response_format":"event_list","style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"title":"Log + body: '{"description":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056","layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[],"template_variables":[],"title":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056","widgets":[{"definition":{"requests":[{"conditional_formats":[{"comparator":">","palette":"white_on_green","value":1000}],"formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"@type:session"}}],"response_format":"scalar","sort":{"count":250,"order_by":[{"index":0,"order":"desc","type":"formula"}]}},{"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"query":{"data_source":"logs_stream","indexes":[],"query_string":"","storage":"hot"},"response_format":"event_list","style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"title":"Log Count by Service and Source","type":"geomap","view":{"focus":"NORTH_AMERICA"}},"layout":{"height":6,"width":12,"x":0,"y":0}}]}' headers: accept: @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"n2i-h6d-x6a","title":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","description":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775","author_handle":"shishi.liu@datadoghq.com","author_name":"Shishi - Liu","layout_type":"ordered","url":"/dashboard/n2i-h6d-x6a/test-createageomapwidgetwithconditionalformatsandtextformats-1765190775","template_variables":[],"widgets":[{"definition":{"requests":[{"conditional_formats":[{"comparator":">","palette":"white_on_green","value":1000}],"formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"@type:session"}}],"response_format":"scalar","sort":{"count":250,"order_by":[{"index":0,"order":"desc","type":"formula"}]}},{"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"query":{"data_source":"logs_stream","indexes":[],"query_string":"","storage":"hot"},"response_format":"event_list","style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"title":"Log - Count by Service and Source","type":"geomap","view":{"focus":"NORTH_AMERICA"}},"layout":{"height":6,"width":12,"x":0,"y":0},"id":4916490421180340}],"notify_list":[],"created_at":"2025-12-08T10:46:15.791396+00:00","modified_at":"2025-12-08T10:46:15.791396+00:00","reflow_type":"fixed","tags":[],"restricted_roles":[]}' + string: '{"id":"bgt-jqb-knw","title":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056","description":"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056","author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/bgt-jqb-knw/test-createageomapwidgetwithconditionalformatsandtextformats-1772451056","template_variables":[],"widgets":[{"definition":{"requests":[{"conditional_formats":[{"comparator":">","palette":"white_on_green","value":1000}],"formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","indexes":["*"],"name":"query1","search":{"query":"@type:session"}}],"response_format":"scalar","sort":{"count":250,"order_by":[{"index":0,"order":"desc","type":"formula"}]}},{"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"query":{"data_source":"logs_stream","indexes":[],"query_string":"","storage":"hot"},"response_format":"event_list","style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"title":"Log + Count by Service and Source","type":"geomap","view":{"focus":"NORTH_AMERICA"}},"layout":{"height":6,"width":12,"x":0,"y":0},"id":5839657916661505}],"notify_list":[],"created_at":"2026-03-02T11:30:56.347840+00:00","modified_at":"2026-03-02T11:30:56.347840+00:00","reflow_type":"fixed","tags":[],"restricted_roles":[]}' headers: content-type: - application/json @@ -26,10 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/n2i-h6d-x6a + uri: https://api.datadoghq.com/api/v1/dashboard/bgt-jqb-knw response: body: - string: '{"deleted_dashboard_id":"n2i-h6d-x6a"}' + string: '{"deleted_dashboard_id":"bgt-jqb-knw"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.frozen index 15ab4cd26e..030a994a88 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.frozen @@ -1 +1 @@ -2024-11-15T19:32:30.413Z \ No newline at end of file +2026-03-02T11:31:04.295Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.yaml index 27e956d21c..63f616f3d6 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_change_widget.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1731699150","widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' + body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1772451064","widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' headers: accept: - application/json @@ -10,9 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"pwu-pqa-fin","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1731699150","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/pwu-pqa-fin/test-createanewdashboardwithaformulasandfunctionschangewidget-1731699150","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0},"id":4495141746383449}],"notify_list":null,"created_at":"2024-11-15T19:32:30.566816+00:00","modified_at":"2024-11-15T19:32:30.566816+00:00","restricted_roles":[]} - - ' + string: '{"id":"tnn-avt-a8u","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1772451064","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/tnn-avt-a8u/test-createanewdashboardwithaformulasandfunctionschangewidget-1772451064","template_variables":null,"widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0},"id":8404351906051529}],"notify_list":null,"created_at":"2026-03-02T11:31:04.419166+00:00","modified_at":"2026-03-02T11:31:04.419166+00:00","restricted_roles":[]}' headers: content-type: - application/json @@ -25,12 +24,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/pwu-pqa-fin + uri: https://api.datadoghq.com/api/v1/dashboard/tnn-avt-a8u response: body: - string: '{"deleted_dashboard_id":"pwu-pqa-fin"} - - ' + string: '{"deleted_dashboard_id":"tnn-avt-a8u"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.frozen index 2186983177..188e625038 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.frozen @@ -1 +1 @@ -2024-11-15T19:32:30.862Z \ No newline at end of file +2026-03-02T11:31:11.876Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.yaml index 00f2091277..772777bb1d 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1731699150","widgets":[{"definition":{"requests":[{"formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"title":"","type":"treemap"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' + body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1772451071","widgets":[{"definition":{"requests":[{"formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"title":"","type":"treemap"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' headers: accept: - application/json @@ -10,9 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"sa5-czr-uat","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1731699150","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/sa5-czr-uat/test-createanewdashboardwithaformulasandfunctionstreemapwidget-1731699150","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"title":"","type":"treemap"},"layout":{"height":4,"width":4,"x":0,"y":0},"id":2892895408255139}],"notify_list":null,"created_at":"2024-11-15T19:32:31.032272+00:00","modified_at":"2024-11-15T19:32:31.032272+00:00","restricted_roles":[]} - - ' + string: '{"id":"ci5-4gc-khj","title":"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1772451071","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/ci5-4gc-khj/test-createanewdashboardwithaformulasandfunctionstreemapwidget-1772451071","template_variables":null,"widgets":[{"definition":{"requests":[{"formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"title":"","type":"treemap"},"layout":{"height":4,"width":4,"x":0,"y":0},"id":3482978988980758}],"notify_list":null,"created_at":"2026-03-02T11:31:12.018143+00:00","modified_at":"2026-03-02T11:31:12.018143+00:00","restricted_roles":[]}' headers: content-type: - application/json @@ -25,12 +24,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/sa5-czr-uat + uri: https://api.datadoghq.com/api/v1/dashboard/ci5-4gc-khj response: body: - string: '{"deleted_dashboard_id":"sa5-czr-uat"} - - ' + string: '{"deleted_dashboard_id":"ci5-4gc-khj"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.frozen index f17762337a..4356a9cd86 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.frozen @@ -1 +1 @@ -2024-11-15T19:32:36.010Z \ No newline at end of file +2026-03-02T11:31:19.426Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.yaml index 43108cd020..9b235d0205 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_an_audit_logs_query.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_an_audit_logs_query-1731699156 - with Audit Logs Query","widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"audit","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":2,"y":0}}]}' + body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_an_audit_logs_query-1772451079 + with Audit Logs Query","widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"audit","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":2,"y":0}}]}' headers: accept: - application/json @@ -11,10 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"gu5-cq8-akb","title":"Test-Create_a_new_dashboard_with_an_audit_logs_query-1731699156 - with Audit Logs Query","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/gu5-cq8-akb/test-createanewdashboardwithanauditlogsquery-1731699156-with-audit-logs-query","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"audit","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":2,"y":0},"id":1074067237256022}],"notify_list":null,"created_at":"2024-11-15T19:32:36.200033+00:00","modified_at":"2024-11-15T19:32:36.200033+00:00","restricted_roles":[]} - - ' + string: '{"id":"u8e-wje-ac7","title":"Test-Create_a_new_dashboard_with_an_audit_logs_query-1772451079 + with Audit Logs Query","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/u8e-wje-ac7/test-createanewdashboardwithanauditlogsquery-1772451079-with-audit-logs-query","template_variables":null,"widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"audit","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":2,"y":0},"id":3153401975327610}],"notify_list":null,"created_at":"2026-03-02T11:31:19.790638+00:00","modified_at":"2026-03-02T11:31:19.790638+00:00","restricted_roles":[]}' headers: content-type: - application/json @@ -27,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/gu5-cq8-akb + uri: https://api.datadoghq.com/api/v1/dashboard/u8e-wje-ac7 response: body: - string: '{"deleted_dashboard_id":"gu5-cq8-akb"} - - ' + string: '{"deleted_dashboard_id":"u8e-wje-ac7"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.frozen new file mode 100644 index 0000000000..28bcf5a21e --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.frozen @@ -0,0 +1 @@ +2026-03-02T11:31:55.658Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.yaml new file mode 100644 index 0000000000..ec851ae335 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by-1772451115 + with events facet group_by","widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"events","group_by":[{"facet":"service","limit":10}],"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":0,"y":0}}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + string: '{"id":"ju2-xz8-5m5","title":"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by-1772451115 + with events facet group_by","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/ju2-xz8-5m5/test-createanewdashboardwithformulasandfunctionseventsqueryusingfacetgroupby-177","template_variables":null,"widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"events","group_by":[{"facet":"service","limit":10}],"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":0,"y":0},"id":810193426998809}],"notify_list":null,"created_at":"2026-03-02T11:31:55.791459+00:00","modified_at":"2026-03-02T11:31:55.791459+00:00","restricted_roles":[]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/ju2-xz8-5m5 + response: + body: + string: '{"deleted_dashboard_id":"ju2-xz8-5m5"}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.frozen new file mode 100644 index 0000000000..d5798d2791 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.frozen @@ -0,0 +1 @@ +2026-03-02T11:32:08.470Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.yaml new file mode 100644 index 0000000000..4a26211765 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields-1772451128 + with events flat group_by fields","widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"events","group_by":{"fields":["service","host"],"limit":10},"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":0,"y":0}}]}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + string: '{"id":"fr8-fsd-e2q","title":"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields-1772451128 + with events flat group_by fields","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/fr8-fsd-e2q/test-createanewdashboardwithformulasandfunctionseventsqueryusingflatgroupbyfield","template_variables":null,"widgets":[{"definition":{"requests":[{"queries":[{"compute":{"aggregation":"count"},"data_source":"events","group_by":{"fields":["service","host"],"limit":10},"name":"query1","search":{"query":""}}],"response_format":"timeseries"}],"type":"timeseries"},"layout":{"height":2,"width":4,"x":0,"y":0},"id":1614310387548006}],"notify_list":null,"created_at":"2026-03-02T11:32:08.617154+00:00","modified_at":"2026-03-02T11:32:08.617154+00:00","restricted_roles":[]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/fr8-fsd-e2q + response: + body: + string: '{"deleted_dashboard_id":"fr8-fsd-e2q"}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.frozen index 6a7b25ee77..a5c1be847d 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-11-15T19:32:44.075Z \ No newline at end of file +2026-03-02T11:31:32.400Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.yaml index b877255587..415765354b 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_invalid_team_tags_returns_bad_request_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"layout_type":"ordered","tags":["tm:foobar"],"title":"Test-Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response-1731699164","widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' + body: '{"layout_type":"ordered","tags":["tm:foobar"],"title":"Test-Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response-1772451092","widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"errors":["Invalid tag format. Tag key must be `team`."]}' + string: '{"errors":["Invalid tag format. Valid tag keys are: team."]}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.frozen index e14f7424cf..b1fc72f492 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.frozen @@ -1 +1 @@ -2024-11-15T19:32:46.182Z \ No newline at end of file +2026-03-02T11:31:40.100Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.yaml index 5638f7867e..d19e1863ce 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1731699166 - with query table widget and storage parameter","widgets":[{"definition":{"requests":[{"formulas":[{"cell_display_mode":"bar","conditional_formats":[],"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""},"storage":"online_archives"}],"response_format":"scalar","sort":{"count":50,"order_by":[{"index":0,"order":"desc","type":"formula"}]}}],"type":"query_table"}}]}' + body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1772451100 + with query table widget and storage parameter","widgets":[{"definition":{"requests":[{"formulas":[{"cell_display_mode":"bar","conditional_formats":[],"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""},"storage":"online_archives"}],"response_format":"scalar","sort":{"count":50,"order_by":[{"index":0,"order":"desc","type":"formula"}]}}],"type":"query_table"}}]}' headers: accept: - application/json @@ -11,10 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"3bi-3is-gj3","title":"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1731699166 - with query table widget and storage parameter","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/3bi-3is-gj3/test-createanewdashboardwithlogsquerytablewidgetandstorageparameter-1731699166-w","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"formulas":[{"cell_display_mode":"bar","conditional_formats":[],"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""},"storage":"online_archives"}],"response_format":"scalar","sort":{"count":50,"order_by":[{"index":0,"order":"desc","type":"formula"}]}}],"type":"query_table"},"id":6318589982774362}],"notify_list":null,"created_at":"2024-11-15T19:32:46.331888+00:00","modified_at":"2024-11-15T19:32:46.331888+00:00","restricted_roles":[]} - - ' + string: '{"id":"w66-sbc-bdb","title":"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1772451100 + with query table widget and storage parameter","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/w66-sbc-bdb/test-createanewdashboardwithlogsquerytablewidgetandstorageparameter-1772451100-w","template_variables":null,"widgets":[{"definition":{"requests":[{"formulas":[{"cell_display_mode":"bar","conditional_formats":[],"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""},"storage":"online_archives"}],"response_format":"scalar","sort":{"count":50,"order_by":[{"index":0,"order":"desc","type":"formula"}]}}],"type":"query_table"},"id":3019646668045057}],"notify_list":null,"created_at":"2026-03-02T11:31:40.238249+00:00","modified_at":"2026-03-02T11:31:40.238249+00:00","restricted_roles":[]}' headers: content-type: - application/json @@ -27,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/3bi-3is-gj3 + uri: https://api.datadoghq.com/api/v1/dashboard/w66-sbc-bdb response: body: - string: '{"deleted_dashboard_id":"3bi-3is-gj3"} - - ' + string: '{"deleted_dashboard_id":"w66-sbc-bdb"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.frozen index a85903d2bb..3808feb8a1 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.frozen @@ -1 +1 @@ -2024-11-15T19:32:57.038Z \ No newline at end of file +2026-03-02T11:31:48.054Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.yaml index 5bb030b9e7..14659a607b 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_dashboard_with_team_tags_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"layout_type":"ordered","tags":["team:foobar"],"title":"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1731699177","widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' + body: '{"layout_type":"ordered","tags":["team:foobar"],"title":"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1772451108","widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0}}]}' headers: accept: - application/json @@ -10,9 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"zb6-66m-ntf","title":"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1731699177","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/zb6-66m-ntf/test-createanewdashboardwithteamtagsreturnsokresponse-1731699177","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","group_by":[],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0},"id":5234430955769094}],"notify_list":null,"created_at":"2024-11-15T19:32:57.190291+00:00","modified_at":"2024-11-15T19:32:57.190291+00:00","tags":["team:foobar"],"restricted_roles":[]} - - ' + string: '{"id":"9y6-h2y-3cw","title":"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1772451108","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/9y6-h2y-3cw/test-createanewdashboardwithteamtagsreturnsokresponse-1772451108","template_variables":null,"widgets":[{"definition":{"requests":[{"change_type":"absolute","compare_to":"hour_before","formulas":[{"formula":"hour_before(query1)"},{"formula":"query1"}],"increase_good":true,"order_by":"change","order_dir":"desc","queries":[{"compute":{"aggregation":"count"},"data_source":"logs","indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"change"},"layout":{"height":4,"width":4,"x":0,"y":0},"id":3025185757829094}],"notify_list":null,"created_at":"2026-03-02T11:31:48.191609+00:00","modified_at":"2026-03-02T11:31:48.191609+00:00","tags":["team:foobar"],"restricted_roles":[]}' headers: content-type: - application/json @@ -25,12 +24,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/zb6-66m-ntf + uri: https://api.datadoghq.com/api/v1/dashboard/9y6-h2y-3cw response: body: - string: '{"deleted_dashboard_id":"zb6-66m-ntf"} - - ' + string: '{"deleted_dashboard_id":"9y6-h2y-3cw"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.frozen index acc6b9445f..ef99a24fcd 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.frozen @@ -1 +1 @@ -2024-11-15T19:33:01.264Z \ No newline at end of file +2026-03-02T11:32:16.355Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.yaml index 69e5524bff..bddab1a636 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_pipelines_data_source.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1731699181 - with ci_pipelines datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' + body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1772451136 + with ci_pipelines datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' headers: accept: - application/json @@ -11,10 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"c2y-k8z-ghy","title":"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1731699181 - with ci_pipelines datasource","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/c2y-k8z-ghy/test-createanewtimeserieswidgetwithcipipelinesdatasource-1731699181-with-cipipel","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":7421904402454882}],"notify_list":null,"created_at":"2024-11-15T19:33:01.435760+00:00","modified_at":"2024-11-15T19:33:01.435760+00:00","reflow_type":"auto","restricted_roles":[]} - - ' + string: '{"id":"ikx-wys-byr","title":"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1772451136 + with ci_pipelines datasource","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/ikx-wys-byr/test-createanewtimeserieswidgetwithcipipelinesdatasource-1772451136-with-cipipel","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":8543991818867248}],"notify_list":null,"created_at":"2026-03-02T11:32:16.504264+00:00","modified_at":"2026-03-02T11:32:16.504264+00:00","reflow_type":"auto","restricted_roles":[]}' headers: content-type: - application/json @@ -27,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/c2y-k8z-ghy + uri: https://api.datadoghq.com/api/v1/dashboard/ikx-wys-byr response: body: - string: '{"deleted_dashboard_id":"c2y-k8z-ghy"} - - ' + string: '{"deleted_dashboard_id":"ikx-wys-byr"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.frozen index 6c2c78659f..99f73e6ef0 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.frozen @@ -1 +1 @@ -2024-11-15T19:33:01.698Z \ No newline at end of file +2026-03-02T11:32:24.328Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.yaml index 99c4362b22..de79c38f59 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_ci_tests_data_source.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1731699181 - with ci_tests datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"ci_tests","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' + body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1772451144 + with ci_tests datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"ci_tests","indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' headers: accept: - application/json @@ -11,10 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"j89-gve-ggt","title":"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1731699181 - with ci_tests datasource","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/j89-gve-ggt/test-createanewtimeserieswidgetwithcitestsdatasource-1731699181-with-citests-dat","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"ci_tests","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":6228011042051238}],"notify_list":null,"created_at":"2024-11-15T19:33:01.854077+00:00","modified_at":"2024-11-15T19:33:01.854077+00:00","reflow_type":"auto","restricted_roles":[]} - - ' + string: '{"id":"f66-zye-xua","title":"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1772451144 + with ci_tests datasource","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/f66-zye-xua/test-createanewtimeserieswidgetwithcitestsdatasource-1772451144-with-citests-dat","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"ci_tests","indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":385385549859535}],"notify_list":null,"created_at":"2026-03-02T11:32:24.462023+00:00","modified_at":"2026-03-02T11:32:24.462023+00:00","reflow_type":"auto","restricted_roles":[]}' headers: content-type: - application/json @@ -27,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/j89-gve-ggt + uri: https://api.datadoghq.com/api/v1/dashboard/f66-zye-xua response: body: - string: '{"deleted_dashboard_id":"j89-gve-ggt"} - - ' + string: '{"deleted_dashboard_id":"f66-zye-xua"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.frozen index 62d6285a0e..9e4af164f3 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.frozen @@ -1 +1 @@ -2024-11-15T19:33:02.114Z \ No newline at end of file +2026-03-02T11:32:32.300Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.yaml index 852a8b1b09..5bf08a52b7 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_incident_analytics_data_source.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1731699182 - with incident_analytics datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"incident_analytics","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' + body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1772451152 + with incident_analytics datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"incident_analytics","indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' headers: accept: - application/json @@ -11,10 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"acy-6e4-hcx","title":"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1731699182 - with incident_analytics datasource","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/acy-6e4-hcx/test-createanewtimeserieswidgetwithincidentanalyticsdatasource-1731699182-with-i","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"incident_analytics","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":1892327793861749}],"notify_list":null,"created_at":"2024-11-15T19:33:02.279466+00:00","modified_at":"2024-11-15T19:33:02.279466+00:00","reflow_type":"auto","restricted_roles":[]} - - ' + string: '{"id":"2er-mww-6yj","title":"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1772451152 + with incident_analytics datasource","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/2er-mww-6yj/test-createanewtimeserieswidgetwithincidentanalyticsdatasource-1772451152-with-i","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"incident_analytics","indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":2433009372435309}],"notify_list":null,"created_at":"2026-03-02T11:32:32.438274+00:00","modified_at":"2026-03-02T11:32:32.438274+00:00","reflow_type":"auto","restricted_roles":[]}' headers: content-type: - application/json @@ -27,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/acy-6e4-hcx + uri: https://api.datadoghq.com/api/v1/dashboard/2er-mww-6yj response: body: - string: '{"deleted_dashboard_id":"acy-6e4-hcx"} - - ' + string: '{"deleted_dashboard_id":"2er-mww-6yj"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.frozen index 6cbda14f17..623625b0e6 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.frozen @@ -1 +1 @@ -2025-08-26T19:47:58.449Z \ No newline at end of file +2026-03-02T11:32:44.844Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.yaml index cc5b177719..ed2e7a943e 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_legacy_live_span_time_format.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1756237678 - with legacy live span time","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"live_span":"5m"},"title":"","type":"timeseries"}}]}' + body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1772451164 + with legacy live span time","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"live_span":"5m"},"title":"","type":"timeseries"}}]}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"wek-eci-qnn","title":"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1756237678 - with legacy live span time","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI - Account","layout_type":"ordered","url":"/dashboard/wek-eci-qnn/test-createanewtimeserieswidgetwithlegacylivespantimeformat-1756237678-with-lega","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"live_span":"5m"},"title":"","type":"timeseries"},"id":3088384387119347}],"notify_list":null,"created_at":"2025-08-26T19:47:58.616519+00:00","modified_at":"2025-08-26T19:47:58.616519+00:00","reflow_type":"auto","restricted_roles":[]}' + string: '{"id":"vk5-d2n-u64","title":"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1772451164 + with legacy live span time","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/vk5-d2n-u64/test-createanewtimeserieswidgetwithlegacylivespantimeformat-1772451164-with-lega","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"live_span":"5m"},"title":"","type":"timeseries"},"id":6488713900601904}],"notify_list":null,"created_at":"2026-03-02T11:32:44.975524+00:00","modified_at":"2026-03-02T11:32:44.975524+00:00","reflow_type":"auto","restricted_roles":[]}' headers: content-type: - application/json @@ -26,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/wek-eci-qnn + uri: https://api.datadoghq.com/api/v1/dashboard/vk5-d2n-u64 response: body: - string: '{"deleted_dashboard_id":"wek-eci-qnn"} - - ' + string: '{"deleted_dashboard_id":"vk5-d2n-u64"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.frozen index 954a958843..c5e47817f3 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.frozen @@ -1 +1 @@ -2025-08-26T19:47:58.908Z \ No newline at end of file +2026-03-02T11:32:52.742Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.yaml index ed5f167351..895b3bff91 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_fixed_span_time_format.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1756237678 - with new fixed span time","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"from":1712080128,"hide_incomplete_cost_data":true,"to":1712083128,"type":"fixed"},"title":"","type":"timeseries"}}]}' + body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1772451172 + with new fixed span time","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"from":1712080128,"hide_incomplete_cost_data":true,"to":1712083128,"type":"fixed"},"title":"","type":"timeseries"}}]}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"43b-7uw-9hv","title":"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1756237678 - with new fixed span time","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI - Account","layout_type":"ordered","url":"/dashboard/43b-7uw-9hv/test-createanewtimeserieswidgetwithnewfixedspantimeformat-1756237678-with-new-fi","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"from":1712080128,"hide_incomplete_cost_data":true,"to":1712083128,"type":"fixed"},"title":"","type":"timeseries"},"id":7908755715912813}],"notify_list":null,"created_at":"2025-08-26T19:47:59.063106+00:00","modified_at":"2025-08-26T19:47:59.063106+00:00","reflow_type":"auto","restricted_roles":[]}' + string: '{"id":"tyc-7bs-dg2","title":"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1772451172 + with new fixed span time","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/tyc-7bs-dg2/test-createanewtimeserieswidgetwithnewfixedspantimeformat-1772451172-with-new-fi","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"from":1712080128,"hide_incomplete_cost_data":true,"to":1712083128,"type":"fixed"},"title":"","type":"timeseries"},"id":3025372441855102}],"notify_list":null,"created_at":"2026-03-02T11:32:53.112506+00:00","modified_at":"2026-03-02T11:32:53.112506+00:00","reflow_type":"auto","restricted_roles":[]}' headers: content-type: - application/json @@ -26,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/43b-7uw-9hv + uri: https://api.datadoghq.com/api/v1/dashboard/tyc-7bs-dg2 response: body: - string: '{"deleted_dashboard_id":"43b-7uw-9hv"} - - ' + string: '{"deleted_dashboard_id":"tyc-7bs-dg2"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.frozen index b4d5164c57..517d03c993 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.frozen @@ -1 +1 @@ -2025-08-26T19:47:59.336Z \ No newline at end of file +2026-03-02T11:33:01.159Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.yaml index d16bef0441..7cd7a2d2d3 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_new_live_span_time_format.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1756237679 - with new live span time","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"type":"live","unit":"minute","value":8},"title":"","type":"timeseries"}}]}' + body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1772451181 + with new live span time","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"type":"live","unit":"minute","value":8},"title":"","type":"timeseries"}}]}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"gwt-rfa-qem","title":"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1756237679 - with new live span time","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI - Account","layout_type":"ordered","url":"/dashboard/gwt-rfa-qem/test-createanewtimeserieswidgetwithnewlivespantimeformat-1756237679-with-new-liv","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"type":"live","unit":"minute","value":8},"title":"","type":"timeseries"},"id":6382558947547501}],"notify_list":null,"created_at":"2025-08-26T19:47:59.501406+00:00","modified_at":"2025-08-26T19:47:59.501406+00:00","reflow_type":"auto","restricted_roles":[]}' + string: '{"id":"j9i-er8-3fp","title":"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1772451181 + with new live span time","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/j9i-er8-3fp/test-createanewtimeserieswidgetwithnewlivespantimeformat-1772451181-with-new-liv","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count","metric":"@ci.queue_time"},"data_source":"ci_pipelines","indexes":["*"],"name":"query1","search":{"query":"ci_level:job"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{"hide_incomplete_cost_data":true,"type":"live","unit":"minute","value":8},"title":"","type":"timeseries"},"id":6064667163154272}],"notify_list":null,"created_at":"2026-03-02T11:33:01.307731+00:00","modified_at":"2026-03-02T11:33:01.307731+00:00","reflow_type":"auto","restricted_roles":[]}' headers: content-type: - application/json @@ -26,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/gwt-rfa-qem + uri: https://api.datadoghq.com/api/v1/dashboard/j9i-er8-3fp response: body: - string: '{"deleted_dashboard_id":"gwt-rfa-qem"} - - ' + string: '{"deleted_dashboard_id":"j9i-er8-3fp"}' headers: content-type: - application/json diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.frozen b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.frozen index ccf84dbc10..936b6e8459 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.frozen +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.frozen @@ -1 +1 @@ -2025-09-18T18:51:17.951Z \ No newline at end of file +2026-03-02T11:33:08.812Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.yaml b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.yaml index a0880b8ce9..baefa6ef7a 100644 --- a/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.yaml +++ b/tests/v1/cassettes/test_scenarios/test_create_a_new_timeseries_widget_with_product_analytics_data_source.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1758221477 - with product_analytics datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"product_analytics","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' + body: '{"layout_type":"ordered","reflow_type":"auto","title":"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1772451188 + with product_analytics datasource","widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"product_analytics","indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"}}]}' headers: accept: - application/json @@ -11,9 +11,9 @@ interactions: uri: https://api.datadoghq.com/api/v1/dashboard response: body: - string: '{"id":"zvr-td5-ppm","title":"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1758221477 - with product_analytics datasource","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI - Account","layout_type":"ordered","url":"/dashboard/zvr-td5-ppm/test-createanewtimeserieswidgetwithproductanalyticsdatasource-1758221477-with-pr","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"product_analytics","group_by":[],"indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":6058978575853641}],"notify_list":null,"created_at":"2025-09-18T18:51:18.107135+00:00","modified_at":"2025-09-18T18:51:18.107135+00:00","reflow_type":"auto","restricted_roles":[]}' + string: '{"id":"i2r-t4n-8wa","title":"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1772451188 + with product_analytics datasource","description":null,"author_handle":"archana.asokan@datadoghq.com","author_name":"Archana + Asokan","layout_type":"ordered","url":"/dashboard/i2r-t4n-8wa/test-createanewtimeserieswidgetwithproductanalyticsdatasource-1772451188-with-pr","template_variables":null,"widgets":[{"definition":{"legend_columns":["avg","min","max","value","sum"],"legend_layout":"auto","requests":[{"display_type":"line","formulas":[{"formula":"query1"}],"queries":[{"compute":{"aggregation":"count"},"data_source":"product_analytics","indexes":["*"],"name":"query1","search":{"query":"test_level:test"}}],"response_format":"timeseries","style":{"line_type":"solid","line_width":"normal","palette":"dog_classic"}}],"show_legend":true,"time":{},"title":"","type":"timeseries"},"id":2831258963755573}],"notify_list":null,"created_at":"2026-03-02T11:33:08.943469+00:00","modified_at":"2026-03-02T11:33:08.943469+00:00","reflow_type":"auto","restricted_roles":[]}' headers: content-type: - application/json @@ -26,12 +26,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/zvr-td5-ppm + uri: https://api.datadoghq.com/api/v1/dashboard/i2r-t4n-8wa response: body: - string: '{"deleted_dashboard_id":"zvr-td5-ppm"} - - ' + string: '{"deleted_dashboard_id":"i2r-t4n-8wa"}' headers: content-type: - application/json diff --git a/tests/v1/features/dashboards.feature b/tests/v1/features/dashboards.feature index 349f7de6f9..5a243eb4be 100644 --- a/tests/v1/features/dashboards.feature +++ b/tests/v1/features/dashboards.feature @@ -38,7 +38,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a distribution widget using a histogram request containing a formulas and functions events query Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "description": "{{ unique }}", "widgets": [ { "definition": { "title": "Events Platform - Request latency HOP", "title_size": "16", "title_align": "left", "show_legend": false, "type": "distribution", "xaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "yaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "requests": [ { "query": { "search": { "query": "" }, "data_source": "events", "compute": { "metric": "@duration", "aggregation": "min" }, "name": "query1", "indexes": [ "*" ], "group_by": [] }, "request_type": "histogram" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "description": "{{ unique }}", "widgets": [ { "definition": { "title": "Events Platform - Request latency HOP", "title_size": "16", "title_align": "left", "show_legend": false, "type": "distribution", "xaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "yaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "requests": [ { "query": { "search": { "query": "" }, "data_source": "events", "compute": { "metric": "@duration", "aggregation": "min" }, "name": "query1", "indexes": [ "*" ] }, "request_type": "histogram" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].request_type" is equal to "histogram" @@ -48,7 +48,6 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].query.compute.aggregation" is equal to "min" And the response "widgets[0].definition.requests[0].query.name" is equal to "query1" And the response "widgets[0].definition.requests[0].query.indexes" is equal to ["*"] - And the response "widgets[0].definition.requests[0].query.group_by" is equal to [] @team:DataDog/dashboards-backend Scenario: Create a distribution widget using a histogram request containing a formulas and functions metrics query @@ -75,7 +74,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a geomap widget with conditional formats and text formats Given new "CreateDashboard" request - And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"Log Count by Service and Source","type":"geomap","requests":[{"response_format":"scalar","queries":[{"data_source":"rum","name":"query1","search":{"query":"@type:session"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"conditional_formats":[{"comparator":">","value":1000,"palette":"white_on_green"}],"formulas":[{"formula":"query1"}],"sort":{"count":250,"order_by":[{"type":"formula","index":0,"order":"desc"}]}},{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[],"storage":"hot"},"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"NORTH_AMERICA"}},"layout":{"x":0,"y":0,"width":12,"height":6}}],"template_variables":[],"layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[]} + And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"Log Count by Service and Source","type":"geomap","requests":[{"response_format":"scalar","queries":[{"data_source":"rum","name":"query1","search":{"query":"@type:session"},"indexes":["*"],"compute":{"aggregation":"count"}}],"conditional_formats":[{"comparator":">","value":1000,"palette":"white_on_green"}],"formulas":[{"formula":"query1"}],"sort":{"count":250,"order_by":[{"type":"formula","index":0,"order":"desc"}]}},{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[],"storage":"hot"},"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"NORTH_AMERICA"}},"layout":{"x":0,"y":0,"width":12,"height":6}}],"template_variables":[],"layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[]} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.type" is equal to "geomap" @@ -144,7 +143,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with a formulas and functions change widget Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" @@ -162,7 +161,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with a formulas and functions treemap widget Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "type": "treemap", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "type": "treemap", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" @@ -296,7 +295,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with an audit logs query Given new "CreateDashboard" request - And body with value {"layout_type": "ordered", "title": "{{ unique }} with Audit Logs Query", "widgets": [{"definition": {"type": "timeseries","requests": [{"response_format": "timeseries","queries": [{"search": {"query": ""},"data_source": "audit","compute": {"aggregation": "count"},"name": "query1","indexes": ["*"],"group_by": []}]}]},"layout": {"x": 2,"y": 0,"width": 4,"height": 2}}]} + And body with value {"layout_type": "ordered", "title": "{{ unique }} with Audit Logs Query", "widgets": [{"definition": {"type": "timeseries","requests": [{"response_format": "timeseries","queries": [{"search": {"query": ""},"data_source": "audit","compute": {"aggregation": "count"},"name": "query1","indexes": ["*"]}]}]},"layout": {"x": 2,"y": 0,"width": 4,"height": 2}}]} When the request is sent Then the response status is 200 OK And the response "title" is equal to "{{ unique }} with Audit Logs Query" @@ -466,6 +465,27 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "metrics" And the response "widgets[0].definition.requests[0].style.palette" is equal to "dog_classic" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with formulas and functions events query using facet group by + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }} with events facet group_by", "widgets": [{"definition": {"type": "timeseries", "requests": [{"response_format": "timeseries", "queries": [{"data_source": "events", "name": "query1", "search": {"query": ""}, "compute": {"aggregation": "count"}, "group_by": [{"facet": "service", "limit": 10}]}]}]}, "layout": {"x": 0, "y": 0, "width": 4, "height": 2}}], "layout_type": "ordered"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "events" + And the response "widgets[0].definition.requests[0].queries[0].group_by[0].facet" is equal to "service" + And the response "widgets[0].definition.requests[0].queries[0].group_by[0].limit" is equal to 10 + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with formulas and functions events query using flat group by fields + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }} with events flat group_by fields", "widgets": [{"definition": {"type": "timeseries", "requests": [{"response_format": "timeseries", "queries": [{"data_source": "events", "name": "query1", "search": {"query": ""}, "compute": {"aggregation": "count"}, "group_by": {"fields": ["service", "host"], "limit": 10}}]}]}, "layout": {"x": 0, "y": 0, "width": 4, "height": 2}}], "layout_type": "ordered"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "events" + And the response "widgets[0].definition.requests[0].queries[0].group_by.fields[0]" is equal to "service" + And the response "widgets[0].definition.requests[0].queries[0].group_by.fields[1]" is equal to "host" + And the response "widgets[0].definition.requests[0].queries[0].group_by.limit" is equal to 10 + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with formulas and functions scatterplot widget Given new "CreateDashboard" request @@ -568,7 +588,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with invalid team tags returns "Bad Request" response Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["tm:foobar"], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["tm:foobar"], "layout_type": "ordered" } When the request is sent Then the response status is 400 Bad Request @@ -628,7 +648,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with logs query table widget and storage parameter Given new "CreateDashboard" request - And body with value {"layout_type":"ordered","title":"{{ unique }} with query table widget and storage parameter","widgets":[{"definition":{"type":"query_table","requests":[{"queries":[{"data_source":"logs","name":"query1","search":{"query":""},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[],"storage":"online_archives"}],"formulas":[{"conditional_formats":[],"cell_display_mode":"bar","formula":"query1"}],"sort":{"count":50, "order_by":[{"type":"formula","index":0,"order":"desc"}]},"response_format":"scalar"}]}}]} + And body with value {"layout_type":"ordered","title":"{{ unique }} with query table widget and storage parameter","widgets":[{"definition":{"type":"query_table","requests":[{"queries":[{"data_source":"logs","name":"query1","search":{"query":""},"indexes":["*"],"compute":{"aggregation":"count"},"storage":"online_archives"}],"formulas":[{"conditional_formats":[],"cell_display_mode":"bar","formula":"query1"}],"sort":{"count":50, "order_by":[{"type":"formula","index":0,"order":"desc"}]},"response_format":"scalar"}]}}]} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.type" is equal to "query_table" @@ -867,7 +887,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with team tags returns "OK" response Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["team:foobar"], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["team:foobar"], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "title" is equal to "{{ unique }}" @@ -1030,7 +1050,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with ci_pipelines data source Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with ci_pipelines datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with ci_pipelines datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "ci_pipelines" @@ -1039,7 +1059,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with ci_tests data source Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with ci_tests datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_tests","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with ci_tests datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_tests","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "ci_tests" @@ -1048,7 +1068,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with incident_analytics data source Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with incident_analytics datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"incident_analytics","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with incident_analytics datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"incident_analytics","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "incident_analytics" @@ -1057,7 +1077,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with legacy live span time format Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with legacy live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"live_span": "5m", "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with legacy live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"live_span": "5m", "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.time.live_span" is equal to "5m" @@ -1066,7 +1086,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with new fixed span time format Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with new fixed span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "fixed", "from": 1712080128, "to": 1712083128, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with new fixed span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "fixed", "from": 1712080128, "to": 1712083128, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.time.type" is equal to "fixed" @@ -1077,7 +1097,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with new live span time format Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with new live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "live", "unit": "minute", "value": 8, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with new live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "live", "unit": "minute", "value": 8, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.time.type" is equal to "live" @@ -1088,7 +1108,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with product_analytics data source Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with product_analytics datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"product_analytics","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with product_analytics datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"product_analytics","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "product_analytics" diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.frozen index 957e037f23..62723cd8d2 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.frozen @@ -1 +1 @@ -2026-02-18T16:57:05.121Z \ No newline at end of file +2026-01-07T12:38:45.716Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.yaml index ee353eaab8..d29e21551c 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_a_test_suite_returns_ok_response.yaml @@ -11,10 +11,10 @@ interactions: uri: https://api.datadoghq.com/api/v2/synthetics/suites response: body: - string: '{"data":{"type":"suites","attributes":{"type":"suite","monitor_id":259845717,"name":"Example - suite name","options":{},"tests":[],"tags":["env:production"],"public_id":"hik-xp5-9q6","created_at":"2026-02-18T16:57:05.583051+00:00","modified_at":"2026-02-18T16:57:05.583051+00:00","created_by":{"name":"Corentin - Girard","email":"corentin.girard@datadoghq.com","handle":"corentin.girard@datadoghq.com"},"message":"Notification - message","org_id":321813,"modified_by":{"name":"Corentin Girard","email":"corentin.girard@datadoghq.com","handle":"corentin.girard@datadoghq.com"}},"id":"hik-xp5-9q6"}} + string: '{"data":{"type":"suites","id":"36n-bb6-njj","attributes":{"tags":["env:production"],"type":"suite","created_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"created_at":"2026-01-07T12:38:46.109472+00:00","modified_at":"2026-01-07T12:38:46.109472+00:00","message":"Notification + message","public_id":"36n-bb6-njj","options":{},"modified_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI + Account"},"tests":[],"name":"Example suite name","org_id":321813,"monitor_id":249141773}}} ' headers: @@ -24,7 +24,7 @@ interactions: code: 200 message: OK - request: - body: '{"data":{"attributes":{"public_ids":["hik-xp5-9q6"]},"type":"delete_suites_request"}}' + body: '{"data":{"attributes":{"public_ids":["36n-bb6-njj"]},"type":"delete_suites_request"}}' headers: accept: - application/json @@ -34,7 +34,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/synthetics/suites/bulk-delete response: body: - string: '{"data":[{"type":"suites","attributes":{"deleted_at":"2026-02-18 16:57:06.420679","public_id":"hik-xp5-9q6"},"id":"hik-xp5-9q6"}]} + string: '{"data":[{"type":"suites","attributes":{"public_id":"36n-bb6-njj","deleted_at":"2026-01-07 + 12:38:46.679914"},"id":"36n-bb6-njj"}]} ' headers: