diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index bf2effce632..48f45d0bc2b 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/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5b151db2a84..53b4a366180 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -69929,6 +69929,7 @@ components: - data type: object ViewershipHistorySessionData: + description: Viewership history session data. properties: attributes: $ref: '#/components/schemas/ViewershipHistorySessionDataAttributes' diff --git a/examples/v1/dashboards/CreateDashboard_1617893815.java b/examples/v1/dashboards/CreateDashboard_1617893815.java index 24c08250dc0..ddc20b804cc 100644 --- a/examples/v1/dashboards/CreateDashboard_1617893815.java +++ b/examples/v1/dashboards/CreateDashboard_1617893815.java @@ -13,6 +13,7 @@ import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionCompute; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionSearch; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupBy; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupByConfig; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupBySort; import com.datadog.api.client.v1.model.FormulaAndFunctionEventsDataSource; import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition; @@ -71,18 +72,19 @@ public static void main(String[] args) { .AVG) .metric("@duration")) .groupBy( - Collections.singletonList( - new FormulaAndFunctionEventQueryGroupBy() - .facet("service") - .limit(1000L) - .sort( - new FormulaAndFunctionEventQueryGroupBySort() - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT) - .order( - QuerySortOrder - .DESC)))) + new FormulaAndFunctionEventQueryGroupByConfig( + Collections.singletonList( + new FormulaAndFunctionEventQueryGroupBy() + .facet("service") + .limit(1000L) + .sort( + new FormulaAndFunctionEventQueryGroupBySort() + .aggregation( + FormulaAndFunctionEventAggregation + .COUNT) + .order( + QuerySortOrder + .DESC))))) .storage("hot")))))))))) .layoutType(DashboardLayoutType.FREE); diff --git a/examples/v1/dashboards/CreateDashboard_4018282928.java b/examples/v1/dashboards/CreateDashboard_4018282928.java new file mode 100644 index 00000000000..4581c3bb93e --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_4018282928.java @@ -0,0 +1,84 @@ +// Create a new dashboard with formulas and functions events query using flat group by fields + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.DashboardLayoutType; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventAggregation; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinition; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionCompute; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionSearch; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupByConfig; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupByFields; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventsDataSource; +import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition; +import com.datadog.api.client.v1.model.FormulaAndFunctionResponseFormat; +import com.datadog.api.client.v1.model.TimeseriesWidgetDefinition; +import com.datadog.api.client.v1.model.TimeseriesWidgetDefinitionType; +import com.datadog.api.client.v1.model.TimeseriesWidgetRequest; +import com.datadog.api.client.v1.model.Widget; +import com.datadog.api.client.v1.model.WidgetDefinition; +import com.datadog.api.client.v1.model.WidgetLayout; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DashboardsApi apiInstance = new DashboardsApi(defaultClient); + + Dashboard body = + new Dashboard() + .title("Example-Dashboard with events flat group_by fields") + .widgets( + Collections.singletonList( + new Widget() + .definition( + new WidgetDefinition( + new TimeseriesWidgetDefinition() + .type(TimeseriesWidgetDefinitionType.TIMESERIES) + .requests( + Collections.singletonList( + new TimeseriesWidgetRequest() + .responseFormat( + FormulaAndFunctionResponseFormat.TIMESERIES) + .queries( + Collections.singletonList( + new FormulaAndFunctionQueryDefinition( + new FormulaAndFunctionEventQueryDefinition() + .dataSource( + FormulaAndFunctionEventsDataSource + .EVENTS) + .name("query1") + .search( + new FormulaAndFunctionEventQueryDefinitionSearch() + .query("")) + .compute( + new FormulaAndFunctionEventQueryDefinitionCompute() + .aggregation( + FormulaAndFunctionEventAggregation + .COUNT)) + .groupBy( + new FormulaAndFunctionEventQueryGroupByConfig( + new FormulaAndFunctionEventQueryGroupByFields() + .fields( + Arrays.asList( + "service", + "host")) + .limit(10L)))))))))) + .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(2L)))) + .layoutType(DashboardLayoutType.ORDERED); + + try { + Dashboard result = apiInstance.createDashboard(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DashboardsApi#createDashboard"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v1/dashboards/CreateDashboard_732700533.java b/examples/v1/dashboards/CreateDashboard_732700533.java new file mode 100644 index 00000000000..4988e9547a9 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_732700533.java @@ -0,0 +1,82 @@ +// Create a new dashboard with formulas and functions events query using facet group by + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.DashboardLayoutType; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventAggregation; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinition; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionCompute; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionSearch; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupBy; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupByConfig; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventsDataSource; +import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition; +import com.datadog.api.client.v1.model.FormulaAndFunctionResponseFormat; +import com.datadog.api.client.v1.model.TimeseriesWidgetDefinition; +import com.datadog.api.client.v1.model.TimeseriesWidgetDefinitionType; +import com.datadog.api.client.v1.model.TimeseriesWidgetRequest; +import com.datadog.api.client.v1.model.Widget; +import com.datadog.api.client.v1.model.WidgetDefinition; +import com.datadog.api.client.v1.model.WidgetLayout; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DashboardsApi apiInstance = new DashboardsApi(defaultClient); + + Dashboard body = + new Dashboard() + .title("Example-Dashboard with events facet group_by") + .widgets( + Collections.singletonList( + new Widget() + .definition( + new WidgetDefinition( + new TimeseriesWidgetDefinition() + .type(TimeseriesWidgetDefinitionType.TIMESERIES) + .requests( + Collections.singletonList( + new TimeseriesWidgetRequest() + .responseFormat( + FormulaAndFunctionResponseFormat.TIMESERIES) + .queries( + Collections.singletonList( + new FormulaAndFunctionQueryDefinition( + new FormulaAndFunctionEventQueryDefinition() + .dataSource( + FormulaAndFunctionEventsDataSource + .EVENTS) + .name("query1") + .search( + new FormulaAndFunctionEventQueryDefinitionSearch() + .query("")) + .compute( + new FormulaAndFunctionEventQueryDefinitionCompute() + .aggregation( + FormulaAndFunctionEventAggregation + .COUNT)) + .groupBy( + new FormulaAndFunctionEventQueryGroupByConfig( + Collections.singletonList( + new FormulaAndFunctionEventQueryGroupBy() + .facet("service") + .limit( + 10L))))))))))) + .layout(new WidgetLayout().x(0L).y(0L).width(4L).height(2L)))) + .layoutType(DashboardLayoutType.ORDERED); + + try { + Dashboard result = apiInstance.createDashboard(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DashboardsApi#createDashboard"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v1/dashboards/CreateDashboard_915214113.java b/examples/v1/dashboards/CreateDashboard_915214113.java index 9d5d3a34850..75cd832cea7 100644 --- a/examples/v1/dashboards/CreateDashboard_915214113.java +++ b/examples/v1/dashboards/CreateDashboard_915214113.java @@ -10,6 +10,7 @@ import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionCompute; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryDefinitionSearch; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupBy; +import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupByConfig; import com.datadog.api.client.v1.model.FormulaAndFunctionEventQueryGroupBySort; import com.datadog.api.client.v1.model.FormulaAndFunctionEventsDataSource; import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition; @@ -80,19 +81,20 @@ public static void main(String[] args) { FormulaAndFunctionEventAggregation .COUNT)) .groupBy( - Collections.singletonList( - new FormulaAndFunctionEventQueryGroupBy() - .facet( - "@geo.country_iso_code") - .limit(250L) - .sort( - new FormulaAndFunctionEventQueryGroupBySort() - .order( - QuerySortOrder - .DESC) - .aggregation( - FormulaAndFunctionEventAggregation - .COUNT))))))) + new FormulaAndFunctionEventQueryGroupByConfig( + Collections.singletonList( + new FormulaAndFunctionEventQueryGroupBy() + .facet( + "@geo.country_iso_code") + .limit(250L) + .sort( + new FormulaAndFunctionEventQueryGroupBySort() + .order( + QuerySortOrder + .DESC) + .aggregation( + FormulaAndFunctionEventAggregation + .COUNT)))))))) .sort( new WidgetSortBy() .count(250L) diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java index 179eda7c3eb..8ba63d73a1a 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryDefinition.java @@ -44,7 +44,7 @@ public class FormulaAndFunctionEventQueryDefinition { private FormulaAndFunctionEventsDataSource dataSource; public static final String JSON_PROPERTY_GROUP_BY = "group_by"; - private List groupBy = null; + private FormulaAndFunctionEventQueryGroupByConfig groupBy; public static final String JSON_PROPERTY_INDEXES = "indexes"; private List indexes = null; @@ -151,37 +151,26 @@ public void setDataSource(FormulaAndFunctionEventsDataSource dataSource) { } public FormulaAndFunctionEventQueryDefinition groupBy( - List groupBy) { + FormulaAndFunctionEventQueryGroupByConfig groupBy) { this.groupBy = groupBy; - for (FormulaAndFunctionEventQueryGroupBy item : groupBy) { - this.unparsed |= item.unparsed; - } - return this; - } - - public FormulaAndFunctionEventQueryDefinition addGroupByItem( - FormulaAndFunctionEventQueryGroupBy groupByItem) { - if (this.groupBy == null) { - this.groupBy = new ArrayList<>(); - } - this.groupBy.add(groupByItem); - this.unparsed |= groupByItem.unparsed; + this.unparsed |= groupBy.unparsed; return this; } /** - * Group by options. + * 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. * * @return groupBy */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP_BY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupBy() { + public FormulaAndFunctionEventQueryGroupByConfig getGroupBy() { return groupBy; } - public void setGroupBy(List groupBy) { + public void setGroupBy(FormulaAndFunctionEventQueryGroupByConfig groupBy) { this.groupBy = groupBy; } diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupByConfig.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupByConfig.java new file mode 100644 index 00000000000..56e5dccd3d2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupByConfig.java @@ -0,0 +1,313 @@ +/* + * 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. + */ + +package com.datadog.api.client.v1.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = + FormulaAndFunctionEventQueryGroupByConfig + .FormulaAndFunctionEventQueryGroupByConfigDeserializer.class) +@JsonSerialize( + using = + FormulaAndFunctionEventQueryGroupByConfig + .FormulaAndFunctionEventQueryGroupByConfigSerializer.class) +public class FormulaAndFunctionEventQueryGroupByConfig extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(FormulaAndFunctionEventQueryGroupByConfig.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class FormulaAndFunctionEventQueryGroupByConfigSerializer + extends StdSerializer { + public FormulaAndFunctionEventQueryGroupByConfigSerializer( + Class t) { + super(t); + } + + public FormulaAndFunctionEventQueryGroupByConfigSerializer() { + this(null); + } + + @Override + public void serialize( + FormulaAndFunctionEventQueryGroupByConfig value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class FormulaAndFunctionEventQueryGroupByConfigDeserializer + extends StdDeserializer { + public FormulaAndFunctionEventQueryGroupByConfigDeserializer() { + this(FormulaAndFunctionEventQueryGroupByConfig.class); + } + + public FormulaAndFunctionEventQueryGroupByConfigDeserializer(Class vc) { + super(vc); + } + + @Override + public FormulaAndFunctionEventQueryGroupByConfig deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize List + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (List.class.equals(Integer.class) + || List.class.equals(Long.class) + || List.class.equals(Float.class) + || List.class.equals(Double.class) + || List.class.equals(Boolean.class) + || List.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((List.class.equals(Integer.class) || List.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((List.class.equals(Float.class) || List.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (List.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (List.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(new TypeReference>() {}); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log( + Level.FINER, "Input data matches schema 'List'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'List'", + e); + } + + // deserialize FormulaAndFunctionEventQueryGroupByFields + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FormulaAndFunctionEventQueryGroupByFields.class.equals(Integer.class) + || FormulaAndFunctionEventQueryGroupByFields.class.equals(Long.class) + || FormulaAndFunctionEventQueryGroupByFields.class.equals(Float.class) + || FormulaAndFunctionEventQueryGroupByFields.class.equals(Double.class) + || FormulaAndFunctionEventQueryGroupByFields.class.equals(Boolean.class) + || FormulaAndFunctionEventQueryGroupByFields.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((FormulaAndFunctionEventQueryGroupByFields.class.equals(Integer.class) + || FormulaAndFunctionEventQueryGroupByFields.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((FormulaAndFunctionEventQueryGroupByFields.class.equals(Float.class) + || FormulaAndFunctionEventQueryGroupByFields.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (FormulaAndFunctionEventQueryGroupByFields.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (FormulaAndFunctionEventQueryGroupByFields.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(FormulaAndFunctionEventQueryGroupByFields.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((FormulaAndFunctionEventQueryGroupByFields) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, "Input data matches schema 'FormulaAndFunctionEventQueryGroupByFields'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'FormulaAndFunctionEventQueryGroupByFields'", + e); + } + + FormulaAndFunctionEventQueryGroupByConfig ret = + new FormulaAndFunctionEventQueryGroupByConfig(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public FormulaAndFunctionEventQueryGroupByConfig getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "FormulaAndFunctionEventQueryGroupByConfig cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public FormulaAndFunctionEventQueryGroupByConfig() { + super("oneOf", Boolean.FALSE); + } + + public FormulaAndFunctionEventQueryGroupByConfig(List o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public FormulaAndFunctionEventQueryGroupByConfig(FormulaAndFunctionEventQueryGroupByFields o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "List", + new GenericType>() {}); + schemas.put( + "FormulaAndFunctionEventQueryGroupByFields", + new GenericType() {}); + JSON.registerDescendants( + FormulaAndFunctionEventQueryGroupByConfig.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return FormulaAndFunctionEventQueryGroupByConfig.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: List<FormulaAndFunctionEventQueryGroupBy>, + * FormulaAndFunctionEventQueryGroupByFields + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(List.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + FormulaAndFunctionEventQueryGroupByFields.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be List," + + " FormulaAndFunctionEventQueryGroupByFields"); + } + + /** + * Get the actual instance, which can be the following: + * List<FormulaAndFunctionEventQueryGroupBy>, FormulaAndFunctionEventQueryGroupByFields + * + * @return The actual instance (List<FormulaAndFunctionEventQueryGroupBy>, + * FormulaAndFunctionEventQueryGroupByFields) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `List<FormulaAndFunctionEventQueryGroupBy>`. If the actual + * instance is not `List<FormulaAndFunctionEventQueryGroupBy>`, the ClassCastException will + * be thrown. + * + * @return The actual instance of `List<FormulaAndFunctionEventQueryGroupBy>` + * @throws ClassCastException if the instance is not + * `List<FormulaAndFunctionEventQueryGroupBy>` + */ + public List getList() throws ClassCastException { + return (List) super.getActualInstance(); + } + + /** + * Get the actual instance of `FormulaAndFunctionEventQueryGroupByFields`. If the actual instance + * is not `FormulaAndFunctionEventQueryGroupByFields`, the ClassCastException will be thrown. + * + * @return The actual instance of `FormulaAndFunctionEventQueryGroupByFields` + * @throws ClassCastException if the instance is not `FormulaAndFunctionEventQueryGroupByFields` + */ + public FormulaAndFunctionEventQueryGroupByFields getFormulaAndFunctionEventQueryGroupByFields() + throws ClassCastException { + return (FormulaAndFunctionEventQueryGroupByFields) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupByFields.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupByFields.java new file mode 100644 index 00000000000..d082e71e5b3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionEventQueryGroupByFields.java @@ -0,0 +1,211 @@ +/* + * 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. + */ + +package com.datadog.api.client.v1.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Flat group by configuration using multiple event facet fields. */ +@JsonPropertyOrder({ + FormulaAndFunctionEventQueryGroupByFields.JSON_PROPERTY_FIELDS, + FormulaAndFunctionEventQueryGroupByFields.JSON_PROPERTY_LIMIT, + FormulaAndFunctionEventQueryGroupByFields.JSON_PROPERTY_SORT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormulaAndFunctionEventQueryGroupByFields { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELDS = "fields"; + private List fields = new ArrayList<>(); + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_SORT = "sort"; + private FormulaAndFunctionEventQueryGroupBySort sort; + + public FormulaAndFunctionEventQueryGroupByFields() {} + + @JsonCreator + public FormulaAndFunctionEventQueryGroupByFields( + @JsonProperty(required = true, value = JSON_PROPERTY_FIELDS) List fields) { + this.fields = fields; + } + + public FormulaAndFunctionEventQueryGroupByFields fields(List fields) { + this.fields = fields; + return this; + } + + public FormulaAndFunctionEventQueryGroupByFields addFieldsItem(String fieldsItem) { + this.fields.add(fieldsItem); + return this; + } + + /** + * List of event facets to group by. + * + * @return fields + */ + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public FormulaAndFunctionEventQueryGroupByFields limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Number of groups to return. + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public FormulaAndFunctionEventQueryGroupByFields sort( + FormulaAndFunctionEventQueryGroupBySort sort) { + this.sort = sort; + this.unparsed |= sort.unparsed; + return this; + } + + /** + * Options for sorting group by results. + * + * @return sort + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FormulaAndFunctionEventQueryGroupBySort getSort() { + return sort; + } + + public void setSort(FormulaAndFunctionEventQueryGroupBySort sort) { + this.sort = sort; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormulaAndFunctionEventQueryGroupByFields + */ + @JsonAnySetter + public FormulaAndFunctionEventQueryGroupByFields putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormulaAndFunctionEventQueryGroupByFields object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormulaAndFunctionEventQueryGroupByFields formulaAndFunctionEventQueryGroupByFields = + (FormulaAndFunctionEventQueryGroupByFields) o; + return Objects.equals(this.fields, formulaAndFunctionEventQueryGroupByFields.fields) + && Objects.equals(this.limit, formulaAndFunctionEventQueryGroupByFields.limit) + && Objects.equals(this.sort, formulaAndFunctionEventQueryGroupByFields.sort) + && Objects.equals( + this.additionalProperties, + formulaAndFunctionEventQueryGroupByFields.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(fields, limit, sort, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormulaAndFunctionEventQueryGroupByFields {\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java index 7a0e2255cc0..7d94d59a76c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** */ +/** Viewership history session data. */ @JsonPropertyOrder({ ViewershipHistorySessionData.JSON_PROPERTY_ATTRIBUTES, ViewershipHistorySessionData.JSON_PROPERTY_ID, diff --git a/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.freeze b/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.freeze index c35a420f434..6a94d75b439 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.json b/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.json index 425ce9c18ee..85e03cd39b8 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.json +++ b/src/test/resources/cassettes/features/v1/Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_query.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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 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}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "fc9281f9-09ee-c892-6ea8-7538fc72a6c3" + "id": "79534cd5-ffcc-4b07-1f44-5d7fa95b7c51" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/p6k-cxc-g8m", + "path": "/api/v1/dashboard/gz8-vqv-w54", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"p6k-cxc-g8m\"}\n", + "body": "{\"deleted_dashboard_id\":\"gz8-vqv-w54\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "a03eda53-3a64-d4ff-e0f3-e68aa7fffbb1" + "id": "812fc3a4-038f-cb46-3100-9bfd29b89bdf" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.freeze b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.freeze index b42d25287e3..449f5cd1549 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.json b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.json index 11ff81ae306..e70fcf97e5a 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.json +++ b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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 Count by Service and Source\",\"type\":\"geomap\",\"view\":{\"focus\":\"NORTH_AMERICA\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "d20ad35b-9db2-e5d7-ed59-9e12c501ec3d" + "id": "14466601-b2a1-6be9-cae1-1aa25da5af73" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/n2i-h6d-x6a", + "path": "/api/v1/dashboard/bgt-jqb-knw", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"n2i-h6d-x6a\"}", + "body": "{\"deleted_dashboard_id\":\"bgt-jqb-knw\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "47b9d688-3355-4d53-5292-1b2bc1461606" + "id": "b83361ea-1056-0036-60bf-1778e43c65ef" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.freeze index 15ab4cd26e0..030a994a889 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.json index 2d65d783238..336e36433fa 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_change_widget.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "80fed7c8-b245-cc45-9c42-a13841342209" + "id": "cc239928-9841-0004-33dc-3f8bf957cd0c" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/pwu-pqa-fin", + "path": "/api/v1/dashboard/tnn-avt-a8u", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"pwu-pqa-fin\"}\n", + "body": "{\"deleted_dashboard_id\":\"tnn-avt-a8u\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "cdfa3daa-1ec9-ac1c-1a55-6d264f7245a4" + "id": "833cc8fa-3e28-d38d-1339-57806934f892" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.freeze index 2186983177e..188e625038d 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.json index 211017241fe..6d890e338b2 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "c9c2c743-6c07-fffb-5f0e-1794c3d0bd18" + "id": "7a5ea77c-7be4-470e-4ed3-ca543b3cd23e" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/sa5-czr-uat", + "path": "/api/v1/dashboard/ci5-4gc-khj", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"sa5-czr-uat\"}\n", + "body": "{\"deleted_dashboard_id\":\"ci5-4gc-khj\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "ba9e299a-c423-545f-f92e-46402cb7ce9c" + "id": "b2de4cdc-3090-e347-647a-3170cfa693b8" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.freeze index f17762337a4..4356a9cd860 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.json index a8f0fa098d9..48bb1b90ffa 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_an_audit_logs_query.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "9dc6d215-b346-d90c-1a05-93a3b9fbe35b" + "id": "ea52756c-dbba-f6aa-df24-08d78acd254f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/gu5-cq8-akb", + "path": "/api/v1/dashboard/u8e-wje-ac7", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"gu5-cq8-akb\"}\n", + "body": "{\"deleted_dashboard_id\":\"u8e-wje-ac7\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "dbfe9501-b41e-568a-5d1a-68228422f5f0" + "id": "f2149766-b3af-06e5-396a-e61dccbf1074" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.freeze new file mode 100644 index 00000000000..28bcf5a21eb --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.freeze @@ -0,0 +1 @@ +2026-03-02T11:31:55.658Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.json new file mode 100644 index 00000000000..61e1f2d2c71 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"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": {}, + "method": "POST", + "path": "/api/v1/dashboard", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "1f592090-95c9-6ffc-dac0-4a7d0eb55f27" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/dashboard/ju2-xz8-5m5", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"deleted_dashboard_id\":\"ju2-xz8-5m5\"}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2c98f92f-7110-720a-2406-ee1b93fefbcf" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.freeze new file mode 100644 index 00000000000..d5798d2791d --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.freeze @@ -0,0 +1 @@ +2026-03-02T11:32:08.470Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.json new file mode 100644 index 00000000000..c12b9129926 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"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": {}, + "method": "POST", + "path": "/api/v1/dashboard", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2adf1f15-baff-fa61-44e3-9a3136c21951" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/dashboard/fr8-fsd-e2q", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"deleted_dashboard_id\":\"fr8-fsd-e2q\"}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "34d5bf70-b3ef-b227-5734-4bcd49d85d34" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.freeze index 6a7b25ee77a..a5c1be847d1 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.json index d24528675ae..8ac017c63c0 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"errors\":[\"Invalid tag format. Tag key must be `team`.\"]}", + "body": "{\"errors\":[\"Invalid tag format. Valid tag keys are: team.\"]}", "headers": { "Content-Type": [ "application/json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "906615d1-ec9f-8c69-c45f-2a8d6c66ecac" + "id": "98abf5dd-b1df-e40f-6aac-1e5cf66c7373" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.freeze index e14f7424cff..b1fc72f4926 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.json index b7d4de38475..e4d44c92101 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "08c70727-f2db-79da-235c-6dcb9f323c05" + "id": "9fbee1cc-25ca-fb1b-af3c-0748a6ede5f3" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/3bi-3is-gj3", + "path": "/api/v1/dashboard/w66-sbc-bdb", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"3bi-3is-gj3\"}\n", + "body": "{\"deleted_dashboard_id\":\"w66-sbc-bdb\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "8af836b4-cf6f-e1f8-bf69-32986a9e2ec0" + "id": "3f7c312e-0714-3a6f-e89e-057503926a0b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.freeze index a85903d2bbf..3808feb8a18 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.json index 428068cb435..aa3e2dc9431 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_team_tags_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "5aaf80dc-ac4e-9c8c-d07f-e6b3ae0a47ff" + "id": "10960d3f-e096-54da-81a5-08892a1e8691" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/zb6-66m-ntf", + "path": "/api/v1/dashboard/9y6-h2y-3cw", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"zb6-66m-ntf\"}\n", + "body": "{\"deleted_dashboard_id\":\"9y6-h2y-3cw\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "09ea3a18-6007-5e12-6a47-a3c592c3741d" + "id": "706bc63a-260f-3b46-8ad9-5784792c3e3c" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.freeze index acc6b9445ff..ef99a24fcd2 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.json index 2b9c89d6713..6520659f80e 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_pipelines_data_source.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "4921b694-3fed-dd1e-558d-3673acac4af7" + "id": "328b0289-dc98-c61d-21f6-248f9d8e1a50" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/c2y-k8z-ghy", + "path": "/api/v1/dashboard/ikx-wys-byr", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"c2y-k8z-ghy\"}\n", + "body": "{\"deleted_dashboard_id\":\"ikx-wys-byr\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "2f1ba076-889e-1a0a-bbd8-b780e66ed573" + "id": "4fb7ff4e-7028-d06b-7e35-81a5f581c6df" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.freeze index 6c2c78659f1..99f73e6ef03 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.json index 432c370ac62..dc40089aeba 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_ci_tests_data_source.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "dc6add39-028d-d4d3-f6d2-b06dd94dd697" + "id": "f05dafe7-4ed3-66fa-042d-b2b2872dc5d0" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/j89-gve-ggt", + "path": "/api/v1/dashboard/f66-zye-xua", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"j89-gve-ggt\"}\n", + "body": "{\"deleted_dashboard_id\":\"f66-zye-xua\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "559da6e6-8800-9af9-8ef7-2e18e50701cd" + "id": "8d788e24-f1d9-3d4e-0ec2-cc71f3c5a442" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.freeze index 62d6285a0e4..9e4af164f3b 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.json index ad8aad0b200..09bbb901803 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_incident_analytics_data_source.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}\n", + "body": "{\"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,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "2c8e3b64-c24d-8c8f-185e-774b7ede62b8" + "id": "95a22a40-ebfe-fb95-4331-63eff4bf87db" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/acy-6e4-hcx", + "path": "/api/v1/dashboard/2er-mww-6yj", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"acy-6e4-hcx\"}\n", + "body": "{\"deleted_dashboard_id\":\"2er-mww-6yj\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "b0bcd4e4-79d5-0aa4-d03b-ce30305c4e80" + "id": "45e59818-0ac4-ca59-db9d-fa467772fd01" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.freeze index 6cbda14f174..623625b0e67 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.json b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.json index 615559d83f6..0dd9925ba3a 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "447629a4-5b3f-7a06-c9ba-c705c9a3da87" + "id": "74f8058c-769c-84ca-6a78-6ba360861056" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/wek-eci-qnn", + "path": "/api/v1/dashboard/vk5-d2n-u64", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"wek-eci-qnn\"}\n", + "body": "{\"deleted_dashboard_id\":\"vk5-d2n-u64\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "df82e41a-4abb-7bf3-fc08-a743973341b0" + "id": "531f3857-a0b4-42f2-1109-a2037b20fe53" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.freeze index 954a9588437..c5e47817f34 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.json b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.json index 8d35a13168a..8194f342595 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_fixed_span_time_format.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "37a8c1a0-5556-4d72-3512-709d2a071c71" + "id": "2b46e455-67b5-a605-be50-e9ba086efedc" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/43b-7uw-9hv", + "path": "/api/v1/dashboard/tyc-7bs-dg2", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"43b-7uw-9hv\"}\n", + "body": "{\"deleted_dashboard_id\":\"tyc-7bs-dg2\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "dd0a7cb4-6f6e-80f1-7627-8667b08ddc4d" + "id": "fd793347-f715-fe33-75a0-8e7809f08697" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.freeze index b4d5164c57a..517d03c9937 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.json b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.json index 874cbfc97d6..d98c79b4f09 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_new_live_span_time_format.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "5003de95-3ff2-f8ad-d65f-dfdd497b2df3" + "id": "d04997de-1ca7-ab80-e6e2-94cac5baa971" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/gwt-rfa-qem", + "path": "/api/v1/dashboard/j9i-er8-3fp", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"gwt-rfa-qem\"}\n", + "body": "{\"deleted_dashboard_id\":\"j9i-er8-3fp\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "4e2dda44-455c-3588-38f7-b466f5842d3b" + "id": "2c4b410e-969e-95f8-7cd4-a7618bb4691e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.freeze index ccf84dbc10c..936b6e8459d 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.freeze +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.freeze @@ -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/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.json index e8023c7f3d2..45089784f0d 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_product_analytics_data_source.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}]}" + "json": "{\"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": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\":[]}", + "body": "{\"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" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "8fcc4923-c4ef-8c94-eabc-b970afb3a8e2" + "id": "9df81c80-987a-2103-58b3-7aa603c4b34f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/zvr-td5-ppm", + "path": "/api/v1/dashboard/i2r-t4n-8wa", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"zvr-td5-ppm\"}\n", + "body": "{\"deleted_dashboard_id\":\"i2r-t4n-8wa\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "b2bcdc4b-8964-a91c-4df0-a3bfb46ad9f5" + "id": "bf21a777-7c69-6574-2699-a2591149964b" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature index 349f7de6f9d..5a243eb4beb 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/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"