From 8eadcfe101c97bb9d447d83e9a667574e1d20271 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 28 Jun 2023 20:37:17 +0000 Subject: [PATCH] Regenerate client from commit e0f0af3f of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 17 +++- .../CreateDashboard_3513586382.java | 98 +++++++++++++++++++ .../client/v1/model/ChangeWidgetRequest.java | 3 +- .../FormulaAndFunctionResponseFormat.java | 9 +- .../client/v1/model/GeomapWidgetRequest.java | 74 +++++++++++++- .../v1/model/QueryValueWidgetRequest.java | 3 +- .../v1/model/ScatterplotTableRequest.java | 3 +- .../v1/model/SunburstWidgetRequest.java | 3 +- .../client/v1/model/TableWidgetRequest.java | 3 +- .../v1/model/TimeseriesWidgetRequest.java | 3 +- .../client/v1/model/ToplistWidgetRequest.java | 3 +- .../client/v1/model/TreeMapWidgetRequest.java | 3 +- ..._widget_using_an_event_list_request.freeze | 1 + ...ap_widget_using_an_event_list_request.json | 58 +++++++++++ .../api/client/v1/api/dashboards.feature | 9 ++ 16 files changed, 281 insertions(+), 17 deletions(-) create mode 100644 examples/v1/dashboards/CreateDashboard_3513586382.java create mode 100644 src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.freeze create mode 100644 src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.json diff --git a/.apigentools-info b/.apigentools-info index 816a2e9a654..0afd59dcd45 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-28 13:29:57.819858", - "spec_repo_commit": "042157e1" + "regenerated": "2023-06-28 20:35:44.639648", + "spec_repo_commit": "e0f0af3f" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-06-28 13:29:57.832502", - "spec_repo_commit": "042157e1" + "regenerated": "2023-06-28 20:35:44.653774", + "spec_repo_commit": "e0f0af3f" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 53dbf14adba..9df3db57772 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2731,15 +2731,18 @@ components: - $ref: '#/components/schemas/FormulaAndFunctionSLOQueryDefinition' type: object FormulaAndFunctionResponseFormat: - description: Timeseries or Scalar response. + description: Timeseries, scalar, or event list response. Event list response + formats are supported by Geomap widgets. enum: - timeseries - scalar + - event_list example: timeseries type: string x-enum-varnames: - TIMESERIES - SCALAR + - EVENT_LIST FormulaAndFunctionSLODataSource: description: Data source for SLO measures queries. enum: @@ -3127,6 +3130,16 @@ components: GeomapWidgetRequest: description: An updated geomap widget. properties: + columns: + description: Widget columns. + example: + - field: timestamp + width: auto + - field: content + width: full + items: + $ref: '#/components/schemas/ListStreamColumn' + type: array formulas: description: List of formulas that operate on queries. items: @@ -3142,6 +3155,8 @@ components: items: $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' type: array + query: + $ref: '#/components/schemas/ListStreamQuery' response_format: $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' rum_query: diff --git a/examples/v1/dashboards/CreateDashboard_3513586382.java b/examples/v1/dashboards/CreateDashboard_3513586382.java new file mode 100644 index 00000000000..ebabb62615a --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_3513586382.java @@ -0,0 +1,98 @@ +// Create a geomap widget using an event_list request + +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.FormulaAndFunctionResponseFormat; +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.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.Widget; +import com.datadog.api.client.v1.model.WidgetDefinition; +import com.datadog.api.client.v1.model.WidgetLayout; +import com.datadog.api.client.v1.model.WidgetTextAlign; +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("") + .titleSize("16") + .titleAlign(WidgetTextAlign.LEFT) + .type(GeomapWidgetDefinitionType.GEOMAP) + .requests( + Collections.singletonList( + new GeomapWidgetRequest() + .responseFormat( + FormulaAndFunctionResponseFormat.EVENT_LIST) + .query( + new ListStreamQuery() + .dataSource(ListStreamSource.LOGS_STREAM) + .queryString("")) + .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), + new ListStreamColumn() + .field("classic") + .width(ListStreamColumnWidth.AUTO), + new ListStreamColumn() + .field("") + .width(ListStreamColumnWidth.AUTO))))) + .style( + new GeomapWidgetDefinitionStyle() + .palette("hostmap_blues") + .paletteFlip(false)) + .view(new GeomapWidgetDefinitionView().focus("WORLD")))) + .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/ChangeWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetRequest.java index 38d85e658aa..9b429cadf29 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ChangeWidgetRequest.java @@ -444,7 +444,8 @@ public ChangeWidgetRequest responseFormat(FormulaAndFunctionResponseFormat respo } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java index 3550da93a9f..7f48a26230d 100644 --- a/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java +++ b/src/main/java/com/datadog/api/client/v1/model/FormulaAndFunctionResponseFormat.java @@ -19,7 +19,10 @@ import java.util.Objects; import java.util.Set; -/** Timeseries or Scalar response. */ +/** + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. + */ @JsonSerialize( using = FormulaAndFunctionResponseFormat.FormulaAndFunctionResponseFormatSerializer.class) public class FormulaAndFunctionResponseFormat { @@ -28,9 +31,11 @@ public class FormulaAndFunctionResponseFormat { new FormulaAndFunctionResponseFormat("timeseries"); public static final FormulaAndFunctionResponseFormat SCALAR = new FormulaAndFunctionResponseFormat("scalar"); + public static final FormulaAndFunctionResponseFormat EVENT_LIST = + new FormulaAndFunctionResponseFormat("event_list"); private static final Set allowedValues = - new HashSet(Arrays.asList("timeseries", "scalar")); + new HashSet(Arrays.asList("timeseries", "scalar", "event_list")); private String value; 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 8dee40d6140..c0025e70968 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 @@ -20,10 +20,12 @@ /** An updated geomap widget. */ @JsonPropertyOrder({ + GeomapWidgetRequest.JSON_PROPERTY_COLUMNS, GeomapWidgetRequest.JSON_PROPERTY_FORMULAS, GeomapWidgetRequest.JSON_PROPERTY_LOG_QUERY, GeomapWidgetRequest.JSON_PROPERTY_Q, GeomapWidgetRequest.JSON_PROPERTY_QUERIES, + GeomapWidgetRequest.JSON_PROPERTY_QUERY, GeomapWidgetRequest.JSON_PROPERTY_RESPONSE_FORMAT, GeomapWidgetRequest.JSON_PROPERTY_RUM_QUERY, GeomapWidgetRequest.JSON_PROPERTY_SECURITY_QUERY @@ -32,6 +34,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GeomapWidgetRequest { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COLUMNS = "columns"; + private List columns = null; + public static final String JSON_PROPERTY_FORMULAS = "formulas"; private List formulas = null; @@ -44,6 +49,9 @@ public class GeomapWidgetRequest { public static final String JSON_PROPERTY_QUERIES = "queries"; private List queries = null; + public static final String JSON_PROPERTY_QUERY = "query"; + private ListStreamQuery query; + public static final String JSON_PROPERTY_RESPONSE_FORMAT = "response_format"; private FormulaAndFunctionResponseFormat responseFormat; @@ -53,6 +61,39 @@ public class GeomapWidgetRequest { public static final String JSON_PROPERTY_SECURITY_QUERY = "security_query"; private LogQueryDefinition securityQuery; + public GeomapWidgetRequest columns(List columns) { + this.columns = columns; + for (ListStreamColumn item : columns) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GeomapWidgetRequest addColumnsItem(ListStreamColumn columnsItem) { + if (this.columns == null) { + this.columns = new ArrayList<>(); + } + this.columns.add(columnsItem); + this.unparsed |= columnsItem.unparsed; + return this; + } + + /** + * Widget columns. + * + * @return columns + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getColumns() { + return columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + public GeomapWidgetRequest formulas(List formulas) { this.formulas = formulas; for (WidgetFormula item : formulas) { @@ -162,6 +203,28 @@ public void setQueries(List queries) { this.queries = queries; } + public GeomapWidgetRequest query(ListStreamQuery query) { + this.query = query; + this.unparsed |= query.unparsed; + return this; + } + + /** + * Updated list stream widget. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ListStreamQuery getQuery() { + return query; + } + + public void setQuery(ListStreamQuery query) { + this.query = query; + } + public GeomapWidgetRequest responseFormat(FormulaAndFunctionResponseFormat responseFormat) { this.responseFormat = responseFormat; this.unparsed |= !responseFormat.isValid(); @@ -169,7 +232,8 @@ public GeomapWidgetRequest responseFormat(FormulaAndFunctionResponseFormat respo } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ @@ -287,10 +351,12 @@ public boolean equals(Object o) { return false; } GeomapWidgetRequest geomapWidgetRequest = (GeomapWidgetRequest) o; - return Objects.equals(this.formulas, geomapWidgetRequest.formulas) + return Objects.equals(this.columns, geomapWidgetRequest.columns) + && Objects.equals(this.formulas, geomapWidgetRequest.formulas) && Objects.equals(this.logQuery, geomapWidgetRequest.logQuery) && Objects.equals(this.q, geomapWidgetRequest.q) && Objects.equals(this.queries, geomapWidgetRequest.queries) + && Objects.equals(this.query, geomapWidgetRequest.query) && Objects.equals(this.responseFormat, geomapWidgetRequest.responseFormat) && Objects.equals(this.rumQuery, geomapWidgetRequest.rumQuery) && Objects.equals(this.securityQuery, geomapWidgetRequest.securityQuery) @@ -300,10 +366,12 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + columns, formulas, logQuery, q, queries, + query, responseFormat, rumQuery, securityQuery, @@ -314,10 +382,12 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GeomapWidgetRequest {\n"); + sb.append(" columns: ").append(toIndentedString(columns)).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"); sb.append(" queries: ").append(toIndentedString(queries)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" responseFormat: ").append(toIndentedString(responseFormat)).append("\n"); sb.append(" rumQuery: ").append(toIndentedString(rumQuery)).append("\n"); sb.append(" securityQuery: ").append(toIndentedString(securityQuery)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java index 2aea3180344..6a9bec0ddcd 100644 --- a/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/QueryValueWidgetRequest.java @@ -393,7 +393,8 @@ public QueryValueWidgetRequest responseFormat(FormulaAndFunctionResponseFormat r } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java b/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java index e2a733f1104..86215abcd22 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ScatterplotTableRequest.java @@ -110,7 +110,8 @@ public ScatterplotTableRequest responseFormat(FormulaAndFunctionResponseFormat r } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java index 6536be9b9bd..329772f3080 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/SunburstWidgetRequest.java @@ -325,7 +325,8 @@ public SunburstWidgetRequest responseFormat(FormulaAndFunctionResponseFormat res } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java index de451c7f6e4..4e83b8a753f 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/TableWidgetRequest.java @@ -506,7 +506,8 @@ public TableWidgetRequest responseFormat(FormulaAndFunctionResponseFormat respon } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java index 14b64688d08..37639c2eec9 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java @@ -420,7 +420,8 @@ public TimeseriesWidgetRequest responseFormat(FormulaAndFunctionResponseFormat r } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java index 2ad6151f30c..f06b1479f62 100644 --- a/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/ToplistWidgetRequest.java @@ -367,7 +367,8 @@ public ToplistWidgetRequest responseFormat(FormulaAndFunctionResponseFormat resp } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java index e47b8d66f93..907abafc494 100644 --- a/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java +++ b/src/main/java/com/datadog/api/client/v1/model/TreeMapWidgetRequest.java @@ -135,7 +135,8 @@ public TreeMapWidgetRequest responseFormat(FormulaAndFunctionResponseFormat resp } /** - * Timeseries or Scalar response. + * Timeseries, scalar, or event list response. Event list response formats are supported by Geomap + * widgets. * * @return responseFormat */ diff --git a/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.freeze b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.freeze new file mode 100644 index 00000000000..4fd6fb9a82e --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.freeze @@ -0,0 +1 @@ +2023-06-21T19:29:03.584Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.json b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.json new file mode 100644 index 00000000000..cadfe26e501 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_geomap_widget_using_an_event_list_request.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"description\":\"Test-Create_a_geomap_widget_using_an_event_list_request-1687375743\",\"layout_type\":\"ordered\",\"notify_list\":[],\"reflow_type\":\"fixed\",\"tags\":[],\"template_variables\":[],\"title\":\"Test-Create_a_geomap_widget_using_an_event_list_request-1687375743\",\"widgets\":[{\"definition\":{\"requests\":[{\"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\"},{\"field\":\"classic\",\"width\":\"auto\"},{\"field\":\"\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\"},\"response_format\":\"event_list\"}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"geomap\",\"view\":{\"focus\":\"WORLD\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0}}]}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v1/dashboard", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"id\":\"cn7-qfm-s9w\",\"title\":\"Test-Create_a_geomap_widget_using_an_event_list_request-1687375743\",\"description\":\"Test-Create_a_geomap_widget_using_an_event_list_request-1687375743\",\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/cn7-qfm-s9w/test-createageomapwidgetusinganeventlistrequest-1687375743\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"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\"},{\"field\":\"classic\",\"width\":\"auto\"},{\"field\":\"\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\"},\"response_format\":\"event_list\"}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"geomap\",\"view\":{\"focus\":\"WORLD\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0},\"id\":8506811379916619}],\"notify_list\":[],\"created_at\":\"2023-06-21T19:29:03.801081+00:00\",\"modified_at\":\"2023-06-21T19:29:03.801081+00:00\",\"reflow_type\":\"fixed\",\"tags\":[],\"restricted_roles\":[]}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c774c1a1-dbaa-ae77-71e6-5be044d0dbf5" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/dashboard/cn7-qfm-s9w", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"deleted_dashboard_id\":\"cn7-qfm-s9w\"}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "868856c7-8f3b-0c86-324a-8e35c825a586" + } +] \ 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 6a3349ebacc..c41cb9df634 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 @@ -54,6 +54,15 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].query.data_source" is equal to "metrics" And the response "widgets[0].definition.requests[0].query.name" is equal to "query1" + @team:DataDog/dashboards-backend + Scenario: Create a geomap widget using an event_list request + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"","title_size":"16","title_align":"left","type":"geomap","requests":[{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[]},"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"},{"field":"classic","width":"auto"},{"field":"","width":"auto"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"WORLD"}},"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.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" + @generated @skip @team:DataDog/dashboards-backend Scenario: Create a new dashboard returns "Bad Request" response Given new "CreateDashboard" request