diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index afb32a4a89a..53c190f6748 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -3448,9 +3448,10 @@ components: $ref: '#/components/schemas/WidgetCustomLink' type: array requests: - description: 'Array of one request object to display in the widget. The - request must contain a `group-by` tag whose value is a country ISO code. - + description: 'Array of request objects to display in the widget. May include + an optional request for the region layer and/or an optional request for + the points layer. Region layer requests must contain a `group-by` tag + whose value is a country ISO code. See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) @@ -3461,7 +3462,7 @@ components: query: {} items: $ref: '#/components/schemas/GeomapWidgetRequest' - maxItems: 1 + maxItems: 2 minItems: 1 type: array style: @@ -3519,8 +3520,9 @@ components: focus: WORLD properties: focus: - description: The 2-letter ISO code of a country to focus the map on. Or - `WORLD`. + description: The 2-letter ISO code of a country to focus the map on, or + `WORLD` for global view, or a region (`EMEA`, `APAC`, `LATAM`), or a continent + (`NORTH_AMERICA`, `SOUTH_AMERICA`, `EUROPE`, `AFRICA`, `ASIA`, `OCEANIA`). example: WORLD type: string required: @@ -3539,6 +3541,12 @@ components: items: $ref: '#/components/schemas/ListStreamColumn' type: array + conditional_formats: + description: Threshold (numeric) conditional formatting rules may be used + by a regions layer. + items: + $ref: '#/components/schemas/WidgetConditionalFormat' + type: array formulas: description: List of formulas that operate on queries. items: @@ -3564,6 +3572,23 @@ components: $ref: '#/components/schemas/LogQueryDefinition' sort: $ref: '#/components/schemas/WidgetSortBy' + style: + $ref: '#/components/schemas/GeomapWidgetRequestStyle' + text_formats: + description: Text formatting rules may be used by a points layer. + items: + $ref: '#/components/schemas/TableWidgetTextFormatRule' + type: array + type: object + GeomapWidgetRequestStyle: + description: The style to apply to the request for points layer. + example: + color_by: status + properties: + color_by: + description: The category to color the points by. + example: status + type: string type: object GraphSnapshot: description: Object representing a graph snapshot. diff --git a/examples/v1/dashboards/CreateDashboard_9836563.java b/examples/v1/dashboards/CreateDashboard_9836563.java new file mode 100644 index 00000000000..6045ebce1ad --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_9836563.java @@ -0,0 +1,168 @@ +// Create a geomap widget with conditional formats and text formats + +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.DashboardReflowType; +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.FormulaAndFunctionEventsDataSource; +import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition; +import com.datadog.api.client.v1.model.FormulaAndFunctionResponseFormat; +import com.datadog.api.client.v1.model.FormulaType; +import com.datadog.api.client.v1.model.GeomapWidgetDefinition; +import com.datadog.api.client.v1.model.GeomapWidgetDefinitionStyle; +import com.datadog.api.client.v1.model.GeomapWidgetDefinitionType; +import com.datadog.api.client.v1.model.GeomapWidgetDefinitionView; +import com.datadog.api.client.v1.model.GeomapWidgetRequest; +import com.datadog.api.client.v1.model.GeomapWidgetRequestStyle; +import com.datadog.api.client.v1.model.ListStreamColumn; +import com.datadog.api.client.v1.model.ListStreamColumnWidth; +import com.datadog.api.client.v1.model.ListStreamQuery; +import com.datadog.api.client.v1.model.ListStreamSource; +import com.datadog.api.client.v1.model.TableWidgetTextFormatMatch; +import com.datadog.api.client.v1.model.TableWidgetTextFormatMatchType; +import com.datadog.api.client.v1.model.TableWidgetTextFormatPalette; +import com.datadog.api.client.v1.model.TableWidgetTextFormatRule; +import com.datadog.api.client.v1.model.Widget; +import com.datadog.api.client.v1.model.WidgetComparator; +import com.datadog.api.client.v1.model.WidgetConditionalFormat; +import com.datadog.api.client.v1.model.WidgetDefinition; +import com.datadog.api.client.v1.model.WidgetFormula; +import com.datadog.api.client.v1.model.WidgetFormulaSort; +import com.datadog.api.client.v1.model.WidgetLayout; +import com.datadog.api.client.v1.model.WidgetPalette; +import com.datadog.api.client.v1.model.WidgetSort; +import com.datadog.api.client.v1.model.WidgetSortBy; +import com.datadog.api.client.v1.model.WidgetSortOrderBy; +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") + .description("Example-Dashboard") + .widgets( + Collections.singletonList( + new Widget() + .definition( + new WidgetDefinition( + new GeomapWidgetDefinition() + .title("Log Count by Service and Source") + .type(GeomapWidgetDefinitionType.GEOMAP) + .requests( + Arrays.asList( + new GeomapWidgetRequest() + .responseFormat( + FormulaAndFunctionResponseFormat.SCALAR) + .queries( + Collections.singletonList( + new FormulaAndFunctionQueryDefinition( + new FormulaAndFunctionEventQueryDefinition() + .dataSource( + FormulaAndFunctionEventsDataSource + .RUM) + .name("query1") + .search( + new FormulaAndFunctionEventQueryDefinitionSearch() + .query("@type:session")) + .indexes( + Collections.singletonList("*")) + .compute( + new FormulaAndFunctionEventQueryDefinitionCompute() + .aggregation( + FormulaAndFunctionEventAggregation + .COUNT))))) + .conditionalFormats( + Collections.singletonList( + new WidgetConditionalFormat() + .comparator( + WidgetComparator.GREATER_THAN) + .value(1000.0) + .palette(WidgetPalette.WHITE_ON_GREEN))) + .formulas( + Collections.singletonList( + new WidgetFormula().formula("query1"))) + .sort( + new WidgetSortBy() + .count(250L) + .orderBy( + Collections.singletonList( + new WidgetSortOrderBy( + new WidgetFormulaSort() + .type(FormulaType.FORMULA) + .index(0L) + .order( + WidgetSort + .DESCENDING))))), + new GeomapWidgetRequest() + .responseFormat( + FormulaAndFunctionResponseFormat.EVENT_LIST) + .query( + new ListStreamQuery() + .dataSource(ListStreamSource.LOGS_STREAM) + .queryString("") + .storage("hot")) + .columns( + Arrays.asList( + new ListStreamColumn() + .field( + "@network.client.geoip.location.latitude") + .width(ListStreamColumnWidth.AUTO), + new ListStreamColumn() + .field( + "@network.client.geoip.location.longitude") + .width(ListStreamColumnWidth.AUTO), + new ListStreamColumn() + .field( + "@network.client.geoip.country.iso_code") + .width(ListStreamColumnWidth.AUTO), + new ListStreamColumn() + .field( + "@network.client.geoip.subdivision.name") + .width(ListStreamColumnWidth.AUTO))) + .style( + new GeomapWidgetRequestStyle() + .colorBy("status")) + .textFormats( + Collections.singletonList( + new TableWidgetTextFormatRule() + .match( + new TableWidgetTextFormatMatch() + .type( + TableWidgetTextFormatMatchType + .IS) + .value("error")) + .palette( + TableWidgetTextFormatPalette + .WHITE_ON_RED))))) + .style( + new GeomapWidgetDefinitionStyle() + .palette("hostmap_blues") + .paletteFlip(false)) + .view(new GeomapWidgetDefinitionView().focus("NORTH_AMERICA")))) + .layout(new WidgetLayout().x(0L).y(0L).width(12L).height(6L)))) + .layoutType(DashboardLayoutType.ORDERED) + .reflowType(DashboardReflowType.FIXED); + + 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/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java index 8644bb8c2d7..4a405e012a0 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinition.java @@ -128,11 +128,11 @@ public GeomapWidgetDefinition addRequestsItem(GeomapWidgetRequest requestsItem) } /** - * Array of one request object to display in the widget. The request must contain a group-by - * tag whose value is a country ISO code. - * - *

See the Request - * JSON schema documentation for information about building the REQUEST_SCHEMA. + * Array of request objects to display in the widget. May include an optional request for the + * region layer and/or an optional request for the points layer. Region layer requests must + * contain a group-by tag whose value is a country ISO code. See the Request JSON schema + * documentation for information about building the REQUEST_SCHEMA. * * @return requests */ diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java index af2c4cedf80..209a33f44c4 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetDefinitionView.java @@ -40,7 +40,10 @@ public GeomapWidgetDefinitionView focus(String focus) { } /** - * The 2-letter ISO code of a country to focus the map on. Or WORLD. + * The 2-letter ISO code of a country to focus the map on, or WORLD for global view, + * or a region (EMEA, APAC, LATAM), or a continent ( + * NORTH_AMERICA, SOUTH_AMERICA, EUROPE, AFRICA, + * ASIA, OCEANIA). * * @return focus */ diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java index 798518eeb0b..4e64f434839 100644 --- a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequest.java @@ -21,6 +21,7 @@ /** An updated geomap widget. */ @JsonPropertyOrder({ GeomapWidgetRequest.JSON_PROPERTY_COLUMNS, + GeomapWidgetRequest.JSON_PROPERTY_CONDITIONAL_FORMATS, GeomapWidgetRequest.JSON_PROPERTY_FORMULAS, GeomapWidgetRequest.JSON_PROPERTY_LOG_QUERY, GeomapWidgetRequest.JSON_PROPERTY_Q, @@ -29,7 +30,9 @@ GeomapWidgetRequest.JSON_PROPERTY_RESPONSE_FORMAT, GeomapWidgetRequest.JSON_PROPERTY_RUM_QUERY, GeomapWidgetRequest.JSON_PROPERTY_SECURITY_QUERY, - GeomapWidgetRequest.JSON_PROPERTY_SORT + GeomapWidgetRequest.JSON_PROPERTY_SORT, + GeomapWidgetRequest.JSON_PROPERTY_STYLE, + GeomapWidgetRequest.JSON_PROPERTY_TEXT_FORMATS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -38,6 +41,9 @@ public class GeomapWidgetRequest { public static final String JSON_PROPERTY_COLUMNS = "columns"; private List columns = null; + public static final String JSON_PROPERTY_CONDITIONAL_FORMATS = "conditional_formats"; + private List conditionalFormats = null; + public static final String JSON_PROPERTY_FORMULAS = "formulas"; private List formulas = null; @@ -65,6 +71,12 @@ public class GeomapWidgetRequest { public static final String JSON_PROPERTY_SORT = "sort"; private WidgetSortBy sort; + public static final String JSON_PROPERTY_STYLE = "style"; + private GeomapWidgetRequestStyle style; + + public static final String JSON_PROPERTY_TEXT_FORMATS = "text_formats"; + private List textFormats = null; + public GeomapWidgetRequest columns(List columns) { this.columns = columns; for (ListStreamColumn item : columns) { @@ -98,6 +110,40 @@ public void setColumns(List columns) { this.columns = columns; } + public GeomapWidgetRequest conditionalFormats(List conditionalFormats) { + this.conditionalFormats = conditionalFormats; + for (WidgetConditionalFormat item : conditionalFormats) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GeomapWidgetRequest addConditionalFormatsItem( + WidgetConditionalFormat conditionalFormatsItem) { + if (this.conditionalFormats == null) { + this.conditionalFormats = new ArrayList<>(); + } + this.conditionalFormats.add(conditionalFormatsItem); + this.unparsed |= conditionalFormatsItem.unparsed; + return this; + } + + /** + * Threshold (numeric) conditional formatting rules may be used by a regions layer. + * + * @return conditionalFormats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONDITIONAL_FORMATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConditionalFormats() { + return conditionalFormats; + } + + public void setConditionalFormats(List conditionalFormats) { + this.conditionalFormats = conditionalFormats; + } + public GeomapWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -321,6 +367,61 @@ public void setSort(WidgetSortBy sort) { this.sort = sort; } + public GeomapWidgetRequest style(GeomapWidgetRequestStyle style) { + this.style = style; + this.unparsed |= style.unparsed; + return this; + } + + /** + * The style to apply to the request for points layer. + * + * @return style + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STYLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GeomapWidgetRequestStyle getStyle() { + return style; + } + + public void setStyle(GeomapWidgetRequestStyle style) { + this.style = style; + } + + public GeomapWidgetRequest textFormats(List textFormats) { + this.textFormats = textFormats; + for (TableWidgetTextFormatRule item : textFormats) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GeomapWidgetRequest addTextFormatsItem(TableWidgetTextFormatRule textFormatsItem) { + if (this.textFormats == null) { + this.textFormats = new ArrayList<>(); + } + this.textFormats.add(textFormatsItem); + this.unparsed |= textFormatsItem.unparsed; + return this; + } + + /** + * Text formatting rules may be used by a points layer. + * + * @return textFormats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT_FORMATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTextFormats() { + return textFormats; + } + + public void setTextFormats(List textFormats) { + this.textFormats = textFormats; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -378,6 +479,7 @@ public boolean equals(Object o) { } GeomapWidgetRequest geomapWidgetRequest = (GeomapWidgetRequest) o; return Objects.equals(this.columns, geomapWidgetRequest.columns) + && Objects.equals(this.conditionalFormats, geomapWidgetRequest.conditionalFormats) && Objects.equals(this.formulas, geomapWidgetRequest.formulas) && Objects.equals(this.logQuery, geomapWidgetRequest.logQuery) && Objects.equals(this.q, geomapWidgetRequest.q) @@ -387,6 +489,8 @@ public boolean equals(Object o) { && Objects.equals(this.rumQuery, geomapWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, geomapWidgetRequest.securityQuery) && Objects.equals(this.sort, geomapWidgetRequest.sort) + && Objects.equals(this.style, geomapWidgetRequest.style) + && Objects.equals(this.textFormats, geomapWidgetRequest.textFormats) && Objects.equals(this.additionalProperties, geomapWidgetRequest.additionalProperties); } @@ -394,6 +498,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( columns, + conditionalFormats, formulas, logQuery, q, @@ -403,6 +508,8 @@ public int hashCode() { rumQuery, securityQuery, sort, + style, + textFormats, additionalProperties); } @@ -411,6 +518,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GeomapWidgetRequest {\n"); sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); + sb.append(" conditionalFormats: ").append(toIndentedString(conditionalFormats)).append("\n"); sb.append(" formulas: ").append(toIndentedString(formulas)).append("\n"); sb.append(" logQuery: ").append(toIndentedString(logQuery)).append("\n"); sb.append(" q: ").append(toIndentedString(q)).append("\n"); @@ -420,6 +528,8 @@ public String toString() { sb.append(" rumQuery: ").append(toIndentedString(rumQuery)).append("\n"); sb.append(" securityQuery: ").append(toIndentedString(securityQuery)).append("\n"); sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" style: ").append(toIndentedString(style)).append("\n"); + sb.append(" textFormats: ").append(toIndentedString(textFormats)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequestStyle.java b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequestStyle.java new file mode 100644 index 00000000000..d01dd3cedbd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/GeomapWidgetRequestStyle.java @@ -0,0 +1,135 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The style to apply to the request for points layer. */ +@JsonPropertyOrder({GeomapWidgetRequestStyle.JSON_PROPERTY_COLOR_BY}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GeomapWidgetRequestStyle { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COLOR_BY = "color_by"; + private String colorBy; + + public GeomapWidgetRequestStyle colorBy(String colorBy) { + this.colorBy = colorBy; + return this; + } + + /** + * The category to color the points by. + * + * @return colorBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getColorBy() { + return colorBy; + } + + public void setColorBy(String colorBy) { + this.colorBy = colorBy; + } + + /** + * 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 GeomapWidgetRequestStyle + */ + @JsonAnySetter + public GeomapWidgetRequestStyle 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 GeomapWidgetRequestStyle object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeomapWidgetRequestStyle geomapWidgetRequestStyle = (GeomapWidgetRequestStyle) o; + return Objects.equals(this.colorBy, geomapWidgetRequestStyle.colorBy) + && Objects.equals(this.additionalProperties, geomapWidgetRequestStyle.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(colorBy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeomapWidgetRequestStyle {\n"); + sb.append(" colorBy: ").append(toIndentedString(colorBy)).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/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 new file mode 100644 index 00000000000..b42d25287e3 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.freeze @@ -0,0 +1 @@ +2025-12-08T10:46:15.353Z \ 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 new file mode 100644 index 00000000000..11ff81ae306 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_with_conditional_formats_and_text_formats.json @@ -0,0 +1,58 @@ +[ + { + "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}}]}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v1/dashboard", + "keepAlive": false, + "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\":[]}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d20ad35b-9db2-e5d7-ed59-9e12c501ec3d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/dashboard/n2i-h6d-x6a", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"deleted_dashboard_id\":\"n2i-h6d-x6a\"}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "47b9d688-3355-4d53-5292-1b2bc1461606" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.freeze index 818d31b6df5..f2f83420d75 100644 --- a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-02T17:11:57.622Z \ No newline at end of file +2025-12-10T09:23:49.955Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.json index 9a7364b9c53..a77d648a4c7 100644 --- a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testcreatedeploymentrulereturnsbadrequestresponse1765358629\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"daadd697-95f4-4608-b6cc-8e6337d692ab\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:11:58.225449Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:11:58.225449Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"39b27cfd-44c1-4ec0-900b-3b46ca2ab8c1\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:50.404151Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testcreatedeploymentrulereturnsbadrequestresponse1765358629\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:50.404151Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c5" + "id": "83bacc36-d0de-676a-6ffd-e92f8be6e9cf" }, { "httpRequest": { @@ -37,7 +37,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/deployment_gates/daadd697-95f4-4608-b6cc-8e6337d692ab/rules", + "path": "/api/v2/deployment_gates/39b27cfd-44c1-4ec0-900b-3b46ca2ab8c1/rules", "keepAlive": false, "secure": true }, @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "a16b8105-dc19-8442-190c-72d42b8c7473" + "id": "99791cf5-f24d-055a-d93c-e342abcc0e03" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/daadd697-95f4-4608-b6cc-8e6337d692ab", + "path": "/api/v2/deployment_gates/39b27cfd-44c1-4ec0-900b-3b46ca2ab8c1", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "227b4564-ccc3-b0f7-2d53-fe1e4001c5be" + "id": "795a68cf-ca48-3d52-cbe5-9787521f623c" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.freeze index f7669bb4b66..63e0f66692d 100644 --- a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-02T17:11:58.561Z \ No newline at end of file +2025-12-10T09:23:50.780Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.json index 7a6d6cc150b..e3637d640df 100644 --- a/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_deployment_rule_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testcreatedeploymentrulereturnsokresponse1765358630\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"b998ebca-01ad-4db8-96e6-a2beb54f497a\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:11:58.67035Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:11:58.67035Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"24d967fe-1dec-4957-bf77-7eda18a65d47\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:50.813397Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testcreatedeploymentrulereturnsokresponse1765358630\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:50.813397Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408bf" + "id": "92892c4c-9c44-828e-e567-a62a33c65db5" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/deployment_gates/b998ebca-01ad-4db8-96e6-a2beb54f497a/rules", + "path": "/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47/rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"3feb569f-bb55-47cb-990f-7bc0c4c076f4\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:11:58.877828Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"b998ebca-01ad-4db8-96e6-a2beb54f497a\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:11:58.877828Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"ebe85a93-a82d-49ec-8925-6d3d569012bb\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:50.871951Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"24d967fe-1dec-4957-bf77-7eda18a65d47\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:50.871951Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "858b1032-9845-1400-4077-7a2b2098be81" + "id": "a6096f20-df6f-977f-0a0c-05986e123041" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/b998ebca-01ad-4db8-96e6-a2beb54f497a/rules/3feb569f-bb55-47cb-990f-7bc0c4c076f4", + "path": "/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47/rules/ebe85a93-a82d-49ec-8925-6d3d569012bb", "keepAlive": false, "secure": true }, @@ -78,13 +78,13 @@ "timeToLive": { "unlimited": true }, - "id": "e7215262-d443-5d95-845d-ca7938047f4a" + "id": "1168ae44-d6cd-cdbd-a562-8c4385d3551f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/b998ebca-01ad-4db8-96e6-a2beb54f497a", + "path": "/api/v2/deployment_gates/24d967fe-1dec-4957-bf77-7eda18a65d47", "keepAlive": false, "secure": true }, @@ -99,6 +99,6 @@ "timeToLive": { "unlimited": true }, - "id": "1840bf91-6f8a-d711-0454-74872823635f" + "id": "43164807-eaa9-7682-b506-1adf0a1f3fe1" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.freeze index 6727b321fa1..10aea5fda05 100644 --- a/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.freeze @@ -1 +1 @@ -2025-12-02T17:11:59.228Z \ No newline at end of file +2025-12-10T09:23:51.011Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.json index 18fbab71ee0..13ae8b8a7c4 100644 --- a/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_deployment_gate_returns_No_Content_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testdeletedeploymentgatereturnsnocontentresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"0d6b54a5-70ad-4e9a-9ee4-f7d99f25a3d5\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:11:59.349857Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:11:59.349857Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"03a2ecd3-87ad-45aa-9dbb-fda1215a4087\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:51.052668Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testdeletedeploymentgatereturnsnocontentresponse1765358631\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:51.052668Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c7" + "id": "8ea9e1c9-0881-49c7-6ac5-d864b98eb1c6" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/0d6b54a5-70ad-4e9a-9ee4-f7d99f25a3d5", + "path": "/api/v2/deployment_gates/03a2ecd3-87ad-45aa-9dbb-fda1215a4087", "keepAlive": false, "secure": true }, @@ -48,13 +48,13 @@ "timeToLive": { "unlimited": true }, - "id": "f64556f1-7830-ddbb-9db5-9662399ee781" + "id": "c134e527-91b6-269f-0fe5-7d9c3c76c189" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/0d6b54a5-70ad-4e9a-9ee4-f7d99f25a3d5", + "path": "/api/v2/deployment_gates/03a2ecd3-87ad-45aa-9dbb-fda1215a4087", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "f64556f1-7830-ddbb-9db5-9662399ee782" + "id": "c134e527-91b6-269f-0fe5-7d9c3c76c18a" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.freeze index 5d67a9ba4b4..63b9423dd79 100644 --- a/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.freeze @@ -1 +1 @@ -2025-12-02T17:11:59.690Z \ No newline at end of file +2025-12-10T09:23:51.205Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.json index 8ad9bd9c6f7..4b045e216a4 100644 --- a/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_deployment_rule_returns_No_Content_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testdeletedeploymentrulereturnsnocontentresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"051490b0-1383-4dd4-b719-fb17ab089898\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:11:59.799293Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:11:59.799293Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"b30401bf-4220-4d42-82ef-68d1a7916f21\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:51.250082Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testdeletedeploymentrulereturnsnocontentresponse1765358631\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:51.250082Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c1" + "id": "7733fc1a-fff5-c193-99af-6914bb127a92" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898/rules", + "path": "/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21/rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"29fb1e0d-d3f4-4f3a-a4de-1bd65cf57c16\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:11:59.98839Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"051490b0-1383-4dd4-b719-fb17ab089898\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:11:59.98839Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"3e9bb31e-27be-43d0-9ef8-571a7f221f59\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:51.336139Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"b30401bf-4220-4d42-82ef-68d1a7916f21\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:51.336139Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "6bd5203e-04e0-c90f-6f84-b04b848997cf" + "id": "d555aed5-798e-4cfc-f5cf-e546f16b3e14" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898/rules/29fb1e0d-d3f4-4f3a-a4de-1bd65cf57c16", + "path": "/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21/rules/3e9bb31e-27be-43d0-9ef8-571a7f221f59", "keepAlive": false, "secure": true }, @@ -78,13 +78,13 @@ "timeToLive": { "unlimited": true }, - "id": "c9a60e1f-d8e8-687e-20b6-65f7b1d70e11" + "id": "56055765-b2f9-b514-5f26-760bdee84a3a" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898/rules/29fb1e0d-d3f4-4f3a-a4de-1bd65cf57c16", + "path": "/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21/rules/3e9bb31e-27be-43d0-9ef8-571a7f221f59", "keepAlive": false, "secure": true }, @@ -104,13 +104,13 @@ "timeToLive": { "unlimited": true }, - "id": "c9a60e1f-d8e8-687e-20b6-65f7b1d70e12" + "id": "56055765-b2f9-b514-5f26-760bdee84a3b" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/051490b0-1383-4dd4-b719-fb17ab089898", + "path": "/api/v2/deployment_gates/b30401bf-4220-4d42-82ef-68d1a7916f21", "keepAlive": false, "secure": true }, @@ -125,6 +125,6 @@ "timeToLive": { "unlimited": true }, - "id": "cfe2dedc-7956-91a6-0c99-f4ee245c8f38" + "id": "80606b1a-7cb1-f1c0-38f2-eaf7e848dce7" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.freeze index a00e4ba26a8..7171264e853 100644 --- a/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-02T17:12:00.422Z \ No newline at end of file +2025-12-10T09:23:51.545Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.json index 0503308cb1f..f5663757aeb 100644 --- a/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_deployment_gate_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentgatereturnsokresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a71a41f7-e7b9-4c51-8af0-397c8e99aaf9\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:00.52354Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:00.52354Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"da8c8c14-6bb2-4fc6-8dac-4027468738e4\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:51.581308Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentgatereturnsokresponse1765358631\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:51.581308Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c6" + "id": "412e8c95-7c57-4376-659c-5781dad217a1" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/deployment_gates/a71a41f7-e7b9-4c51-8af0-397c8e99aaf9", + "path": "/api/v2/deployment_gates/da8c8c14-6bb2-4fc6-8dac-4027468738e4", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a71a41f7-e7b9-4c51-8af0-397c8e99aaf9\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:00.52354Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:00.52354Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"da8c8c14-6bb2-4fc6-8dac-4027468738e4\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:51.581308Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentgatereturnsokresponse1765358631\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:51.581308Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "7a1714b6-c4d9-89fa-0a6f-7c0023d67164" + "id": "41efec9f-7d12-bbbf-4254-a893399dbee7" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/a71a41f7-e7b9-4c51-8af0-397c8e99aaf9", + "path": "/api/v2/deployment_gates/da8c8c14-6bb2-4fc6-8dac-4027468738e4", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "b2ac5be2-bfad-4104-b212-2c28f0abe7ae" + "id": "7d18ab44-8e43-0345-d6e9-f5ae3be97dfd" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.freeze index e00dc1eb2f1..80aa87053a9 100644 --- a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-02T17:12:00.864Z \ No newline at end of file +2025-12-10T09:23:51.725Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.json index 6ac42251bbb..6ed4694683e 100644 --- a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentrulereturnsbadrequestresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"241e9292-911a-4eea-90e0-83b5f27a468c\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:00.969748Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:00.969748Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"5815296a-7bd8-4a27-86c1-9bb266c19078\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:51.766765Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentrulereturnsbadrequestresponse1765358631\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:51.766765Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408be" + "id": "281ed7b8-c09b-5405-e7a0-1dd3d77c3785" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/deployment_gates/241e9292-911a-4eea-90e0-83b5f27a468c/rules", + "path": "/api/v2/deployment_gates/5815296a-7bd8-4a27-86c1-9bb266c19078/rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"48d335e3-7744-4aef-af75-7c6d0bb9e24e\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:01.161979Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"241e9292-911a-4eea-90e0-83b5f27a468c\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:12:01.161979Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"1b2fb3ea-a7aa-4d17-92ac-53e625de862e\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:51.829441Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"5815296a-7bd8-4a27-86c1-9bb266c19078\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:51.829441Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "46c6cd47-c13b-157d-94b8-22aee9e7ae3c" + "id": "2a501994-2337-5b4e-6d8e-f5ef58ee07b1" }, { "httpRequest": { @@ -89,7 +89,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/241e9292-911a-4eea-90e0-83b5f27a468c/rules/48d335e3-7744-4aef-af75-7c6d0bb9e24e", + "path": "/api/v2/deployment_gates/5815296a-7bd8-4a27-86c1-9bb266c19078/rules/1b2fb3ea-a7aa-4d17-92ac-53e625de862e", "keepAlive": false, "secure": true }, @@ -104,13 +104,13 @@ "timeToLive": { "unlimited": true }, - "id": "9384928f-864c-0dbe-3913-5428e689b7d6" + "id": "6cb35e04-8af6-51b1-12fe-ec761d71de38" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/241e9292-911a-4eea-90e0-83b5f27a468c", + "path": "/api/v2/deployment_gates/5815296a-7bd8-4a27-86c1-9bb266c19078", "keepAlive": false, "secure": true }, @@ -125,6 +125,6 @@ "timeToLive": { "unlimited": true }, - "id": "6cc88ec8-1e87-3471-c71c-8dcc05d08e18" + "id": "55a11390-3d67-9651-d72b-979988034cb8" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.freeze index d03936e1d00..3a24fa14046 100644 --- a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-02T17:12:01.624Z \ No newline at end of file +2025-12-10T09:23:51.998Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.json index 72f13792d83..f628d8f04ed 100644 --- a/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_deployment_rule_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentrulereturnsokresponse1765358631\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"defa04e5-9bb2-4a40-b854-1c2378ffcc58\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:01.70723Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:01.70723Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"6177e46c-44dc-453d-8af8-8af86aa93c29\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.029575Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testgetdeploymentrulereturnsokresponse1765358631\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:52.029575Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c2" + "id": "5a8b836c-5bac-769d-09a2-26f15b892174" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules", + "path": "/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"c1009845-b7a4-4701-846b-df160891ab3d\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:01.871247Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"defa04e5-9bb2-4a40-b854-1c2378ffcc58\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:12:01.871247Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"38e32cd3-d245-49c1-85c5-b039ef868a18\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.079318Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"6177e46c-44dc-453d-8af8-8af86aa93c29\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:52.079318Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,18 +57,18 @@ "timeToLive": { "unlimited": true }, - "id": "56de325f-f9cd-0433-e688-e48e07c5750b" + "id": "cbab2cf6-714d-4812-323a-ba60fbdde284" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules/c1009845-b7a4-4701-846b-df160891ab3d", + "path": "/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules/38e32cd3-d245-49c1-85c5-b039ef868a18", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"c1009845-b7a4-4701-846b-df160891ab3d\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:01.871247Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"defa04e5-9bb2-4a40-b854-1c2378ffcc58\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:12:01.871247Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"38e32cd3-d245-49c1-85c5-b039ef868a18\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.079318Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"6177e46c-44dc-453d-8af8-8af86aa93c29\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:52.079318Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -83,13 +83,13 @@ "timeToLive": { "unlimited": true }, - "id": "ac25de48-1d87-191f-4775-4920915c1ae3" + "id": "51579ab8-6f86-51fb-e286-a5194ecc35da" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58/rules/c1009845-b7a4-4701-846b-df160891ab3d", + "path": "/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29/rules/38e32cd3-d245-49c1-85c5-b039ef868a18", "keepAlive": false, "secure": true }, @@ -104,13 +104,13 @@ "timeToLive": { "unlimited": true }, - "id": "d76616cf-2a97-5263-5b9d-5a90b190f24d" + "id": "1c77bf1c-234d-46db-9690-f756de42ad13" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/defa04e5-9bb2-4a40-b854-1c2378ffcc58", + "path": "/api/v2/deployment_gates/6177e46c-44dc-453d-8af8-8af86aa93c29", "keepAlive": false, "secure": true }, @@ -125,6 +125,6 @@ "timeToLive": { "unlimited": true }, - "id": "9b65b4bd-320f-a9f0-d8f2-96113a4ccca3" + "id": "4ffe6539-7452-6b7b-fdea-1f939ca6c842" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.freeze index 363a2cef56e..9f4cffa663a 100644 --- a/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-02T17:12:02.280Z \ No newline at end of file +2025-12-10T09:23:52.262Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.json index 3268e8fe4fc..cc93b618441 100644 --- a/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_deployment_gate_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentgatereturnsokresponse1765358632\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"010e234b-b358-463e-a44d-6fbe29ec3f6b\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:02.374479Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:02.374479Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"c718bd5b-86d4-43a5-9aff-b4e7757074ba\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.299803Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentgatereturnsokresponse1765358632\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:52.299803Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c0" + "id": "4cbb56c7-41b9-1993-d40f-f1eff47a2a19" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "PUT", - "path": "/api/v2/deployment_gates/010e234b-b358-463e-a44d-6fbe29ec3f6b", + "path": "/api/v2/deployment_gates/c718bd5b-86d4-43a5-9aff-b4e7757074ba", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"010e234b-b358-463e-a44d-6fbe29ec3f6b\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:02.374479Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:02.534024Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"c718bd5b-86d4-43a5-9aff-b4e7757074ba\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.299803Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentgatereturnsokresponse1765358632\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:52.363356Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "78f3dddd-bd3f-cafd-d7f0-459709403df3" + "id": "609338e9-6c33-1a70-8557-cbea043ed17b" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/010e234b-b358-463e-a44d-6fbe29ec3f6b", + "path": "/api/v2/deployment_gates/c718bd5b-86d4-43a5-9aff-b4e7757074ba", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "0c4a6265-0194-294d-13cc-02cd7a727d3a" + "id": "fafeebf7-f412-5305-c72d-df46ea186e22" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.freeze index 742e9ca6042..2f1e7eeb817 100644 --- a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-02T17:12:02.719Z \ No newline at end of file +2025-12-10T09:23:52.426Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.json index c5929ce1c19..1cffb7c77e2 100644 --- a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentrulereturnsbadrequestresponse1765358632\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ef2fa0b3-0f6a-49a4-9043-1d8130cb7361\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:02.81563Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:02.81563Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"edb4daf3-86d3-43d0-9a18-0390d53c4a52\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.462721Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentrulereturnsbadrequestresponse1765358632\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:52.462721Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c4" + "id": "2dcfd0ff-c912-d9ed-dc32-f5612f3a1852" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/deployment_gates/ef2fa0b3-0f6a-49a4-9043-1d8130cb7361/rules", + "path": "/api/v2/deployment_gates/edb4daf3-86d3-43d0-9a18-0390d53c4a52/rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"c89bf1d3-5e6a-43b1-9009-cfaaaddf8518\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:02.99992Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"ef2fa0b3-0f6a-49a4-9043-1d8130cb7361\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:12:02.99992Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"f66b2121-b794-4926-8d65-c1f2dcb7870b\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.5225Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"edb4daf3-86d3-43d0-9a18-0390d53c4a52\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:52.5225Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "f83da15c-7a67-dfdd-8dd0-752cd21dc851" + "id": "2c41d1c8-0768-4e48-aa24-d2ed424e20fa" }, { "httpRequest": { @@ -93,7 +93,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/ef2fa0b3-0f6a-49a4-9043-1d8130cb7361/rules/c89bf1d3-5e6a-43b1-9009-cfaaaddf8518", + "path": "/api/v2/deployment_gates/edb4daf3-86d3-43d0-9a18-0390d53c4a52/rules/f66b2121-b794-4926-8d65-c1f2dcb7870b", "keepAlive": false, "secure": true }, @@ -108,13 +108,13 @@ "timeToLive": { "unlimited": true }, - "id": "e19d5544-ecf7-6158-1bfd-8cbb60d0e164" + "id": "eb2e5cee-ca92-c2a6-5290-4cad8e42877b" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/ef2fa0b3-0f6a-49a4-9043-1d8130cb7361", + "path": "/api/v2/deployment_gates/edb4daf3-86d3-43d0-9a18-0390d53c4a52", "keepAlive": false, "secure": true }, @@ -129,6 +129,6 @@ "timeToLive": { "unlimited": true }, - "id": "118fea1f-f206-8f73-3707-ca2bf9229e27" + "id": "314df86b-5f14-cc2c-87f6-88e6d2cec4af" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.freeze index e8ff3a3f0e3..aceddb95a6c 100644 --- a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-02T17:12:03.436Z \ No newline at end of file +2025-12-10T09:23:52.700Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.json index fe9255c2d61..3297b791ce4 100644 --- a/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_deployment_rule_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" + "json": "{\"data\":{\"attributes\":{\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentrulereturnsokresponse1765358632\",\"service\":\"my-service\"},\"type\":\"deployment_gate\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"bfdae182-ee23-493c-a90b-05441a76ad73\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:03.529101Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate\",\"service\":\"my-service\",\"updated_at\":\"2025-12-02T17:12:03.529101Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"3acb9ac2-abba-4579-8697-79493b221d41\",\"type\":\"deployment_gate\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.735765Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"env\":\"production\",\"identifier\":\"my-gate-testupdatedeploymentrulereturnsokresponse1765358632\",\"service\":\"my-service\",\"updated_at\":\"2025-12-10T09:23:52.735765Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "70acb264-a190-c950-4530-585b68c408c3" + "id": "145162f9-d6a7-5cd5-9467-fc55d184ba15" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73/rules", + "path": "/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"93ed5e98-aeb8-4096-a035-0907f327019e\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:03.68857Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"bfdae182-ee23-493c-a90b-05441a76ad73\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:12:03.68857Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"ee04f24f-a980-4a28-a839-29911a632978\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.782282Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"3acb9ac2-abba-4579-8697-79493b221d41\",\"name\":\"My deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:52.782282Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "a39e041f-34ce-b6f9-492a-015e652dafb3" + "id": "af285184-8e2e-cb60-1efa-5e586ac3acb9" }, { "httpRequest": { @@ -67,12 +67,12 @@ }, "headers": {}, "method": "PUT", - "path": "/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73/rules/93ed5e98-aeb8-4096-a035-0907f327019e", + "path": "/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules/ee04f24f-a980-4a28-a839-29911a632978", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"93ed5e98-aeb8-4096-a035-0907f327019e\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-02T17:12:03.68857Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"bfdae182-ee23-493c-a90b-05441a76ad73\",\"name\":\"Updated deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-02T17:12:03.882016Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "body": "{\"data\":{\"id\":\"ee04f24f-a980-4a28-a839-29911a632978\",\"type\":\"deployment_rule\",\"attributes\":{\"created_at\":\"2025-12-10T09:23:52.782282Z\",\"created_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"dry_run\":false,\"gate_id\":\"3acb9ac2-abba-4579-8697-79493b221d41\",\"name\":\"Updated deployment rule\",\"options\":{},\"type\":\"faulty_deployment_detection\",\"updated_at\":\"2025-12-10T09:23:52.843771Z\",\"updated_by\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -87,13 +87,13 @@ "timeToLive": { "unlimited": true }, - "id": "73db724b-34b9-23fb-9147-af57af849393" + "id": "8e74cbf3-c27b-5335-5cbf-770661a67aa9" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73/rules/93ed5e98-aeb8-4096-a035-0907f327019e", + "path": "/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41/rules/ee04f24f-a980-4a28-a839-29911a632978", "keepAlive": false, "secure": true }, @@ -108,13 +108,13 @@ "timeToLive": { "unlimited": true }, - "id": "bf7e48fc-9eed-3ef6-ca33-9f9dd223876f" + "id": "c8425d41-2083-3bc3-bf28-f3ad164ffc22" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/deployment_gates/bfdae182-ee23-493c-a90b-05441a76ad73", + "path": "/api/v2/deployment_gates/3acb9ac2-abba-4579-8697-79493b221d41", "keepAlive": false, "secure": true }, @@ -129,6 +129,6 @@ "timeToLive": { "unlimited": true }, - "id": "cbada0b0-28a3-6291-c171-7d710fde6323" + "id": "0da16de6-8d6d-7baf-f55b-b71f9e912045" } ] \ 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 3eeebebdc24..588c609cedd 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 @@ -72,6 +72,22 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list" And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_stream" + @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":[]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "geomap" + And the response "widgets[0].definition.title" is equal to "Log Count by Service and Source" + And the response "widgets[0].definition.requests[0].conditional_formats[0].comparator" is equal to ">" + And the response "widgets[0].definition.requests[0].conditional_formats[0].palette" is equal to "white_on_green" + And the response "widgets[0].definition.requests[0].conditional_formats[0].value" is equal to 1000 + And the response "widgets[0].definition.requests[1].text_formats[0].match.type" is equal to "is" + And the response "widgets[0].definition.requests[1].text_formats[0].match.value" is equal to "error" + And the response "widgets[0].definition.requests[1].text_formats[0].palette" is equal to "white_on_red" + And the response "widgets[0].definition.view.focus" is equal to "NORTH_AMERICA" + @generated @skip @team:DataDog/dashboards-backend Scenario: Create a new dashboard returns "Bad Request" response Given new "CreateDashboard" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index ad563ffc789..a6a148f264e 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -350,7 +350,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate-{{ unique_lower_alnum }}\",\n \"dry_run\": false\n }\n }\n}" } ], "step": "there is a valid \"deployment_gate\" in the system",