From 856de3e7728668b661f43cc7c9cf1351ba42d80a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 30 Jun 2026 20:14:58 +0000 Subject: [PATCH] Regenerate client from commit a73640a of spec repo --- .generator/schemas/v1/openapi.yaml | 11 +++++ ...ream-list-stream-widget-and-version.frozen | 1 + ...-stream-list-stream-widget-and-version.yml | 45 +++++++++++++++++++ .../dashboards/CreateDashboard_153558925.rb | 44 ++++++++++++++++++ features/v1/dashboards.feature | 9 ++++ lib/datadog_api_client/inflector.rb | 1 + .../v1/models/list_stream_query.rb | 17 +++++-- .../v1/models/list_stream_query_version.rb | 27 +++++++++++ 8 files changed, 152 insertions(+), 3 deletions(-) create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.frozen create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.yml create mode 100644 examples/v1/dashboards/CreateDashboard_153558925.rb create mode 100644 lib/datadog_api_client/v1/models/list_stream_query_version.rb diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index d829783224aa..e11d56f929c1 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -5807,10 +5807,21 @@ components: description: Team handle. type: string type: array + version: + $ref: "#/components/schemas/ListStreamQueryVersion" required: - query_string - data_source type: object + ListStreamQueryVersion: + description: |- + Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is + preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.** + enum: + - sequential_query + type: string + x-enum-varnames: + - SEQUENTIAL_QUERY ListStreamResponseFormat: description: Widget response format. enum: diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.frozen new file mode 100644 index 000000000000..8fa8e29815b4 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.frozen @@ -0,0 +1 @@ +2026-06-30T18:19:26.621Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.yml new file mode 100644 index 000000000000..35399510df61 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-logs-transaction-stream-list-stream-widget-and-version.yml @@ -0,0 +1,45 @@ +http_interactions: +- recorded_at: Tue, 30 Jun 2026 18:19:26 GMT + request: + body: + encoding: UTF-8 + string: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget_and_version-1782843566 + with list_stream widget","widgets":[{"definition":{"requests":[{"columns":[{"field":"timestamp","width":"auto"}],"query":{"compute":[{"aggregation":"count","facet":"service"}],"data_source":"logs_transaction_stream","group_by":[{"facet":"service"}],"query_string":"","version":"sequential_query"},"response_format":"event_list"}],"type":"list_stream"}}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + encoding: UTF-8 + string: '{"id":"72a-q2p-zau","title":"Test-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget_and_version-1782843566 + with list_stream widget","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI + Account","layout_type":"ordered","url":"/dashboard/72a-q2p-zau/test-createanewdashboardwithlogstransactionstreamliststreamwidgetandversion-1782","template_variables":null,"widgets":[{"definition":{"requests":[{"columns":[{"field":"timestamp","width":"auto"}],"query":{"compute":[{"aggregation":"count","facet":"service"}],"data_source":"logs_transaction_stream","group_by":[{"facet":"service"}],"query_string":"","version":"sequential_query"},"response_format":"event_list"}],"type":"list_stream"},"id":7740630869906828}],"notify_list":null,"created_at":"2026-06-30T18:19:26.794909+00:00","modified_at":"2026-06-30T18:19:26.794909+00:00","restricted_roles":[]}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 30 Jun 2026 18:19:26 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/72a-q2p-zau + response: + body: + encoding: UTF-8 + string: '{"deleted_dashboard_id":"72a-q2p-zau"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v1/dashboards/CreateDashboard_153558925.rb b/examples/v1/dashboards/CreateDashboard_153558925.rb new file mode 100644 index 000000000000..be0e5f07cfc0 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_153558925.rb @@ -0,0 +1,44 @@ +# Create a new dashboard with logs_transaction_stream list_stream widget and version + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::DashboardsAPI.new + +body = DatadogAPIClient::V1::Dashboard.new({ + layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED, + title: "Example-Dashboard with list_stream widget", + widgets: [ + DatadogAPIClient::V1::Widget.new({ + definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({ + type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM, + requests: [ + DatadogAPIClient::V1::ListStreamWidgetRequest.new({ + columns: [ + DatadogAPIClient::V1::ListStreamColumn.new({ + width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO, + field: "timestamp", + }), + ], + query: DatadogAPIClient::V1::ListStreamQuery.new({ + data_source: DatadogAPIClient::V1::ListStreamSource::LOGS_TRANSACTION_STREAM, + query_string: "", + group_by: [ + DatadogAPIClient::V1::ListStreamGroupByItems.new({ + facet: "service", + }), + ], + compute: [ + DatadogAPIClient::V1::ListStreamComputeItems.new({ + facet: "service", + aggregation: DatadogAPIClient::V1::ListStreamComputeAggregation::COUNT, + }), + ], + version: DatadogAPIClient::V1::ListStreamQueryVersion::SEQUENTIAL_QUERY, + }), + response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST, + }), + ], + }), + }), + ], +}) +p api_instance.create_dashboard(body) diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index 932dc22b0b39..42df30e0a6f3 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -721,6 +721,15 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].query.compute[0].facet" is equal to "service" And the response "widgets[0].definition.requests[0].query.compute[0].aggregation" is equal to "count" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with logs_transaction_stream list_stream widget and version + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"logs_transaction_stream","query_string":"","group_by":[{"facet":"service"}],"compute":[{"facet":"service","aggregation":"count"}],"version":"sequential_query"},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_transaction_stream" + And the response "widgets[0].definition.requests[0].query.version" is equal to "sequential_query" + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with manage_status widget Given new "CreateDashboard" request diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index cd59777811a4..0c4a2bc29093 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -266,6 +266,7 @@ def overrides "v1.list_stream_issue_persona" => "ListStreamIssuePersona", "v1.list_stream_issue_state" => "ListStreamIssueState", "v1.list_stream_query" => "ListStreamQuery", + "v1.list_stream_query_version" => "ListStreamQueryVersion", "v1.list_stream_response_format" => "ListStreamResponseFormat", "v1.list_stream_source" => "ListStreamSource", "v1.list_stream_widget_definition" => "ListStreamWidgetDefinition", diff --git a/lib/datadog_api_client/v1/models/list_stream_query.rb b/lib/datadog_api_client/v1/models/list_stream_query.rb index 9046dd811bdd..8ca7b1ce5daa 100644 --- a/lib/datadog_api_client/v1/models/list_stream_query.rb +++ b/lib/datadog_api_client/v1/models/list_stream_query.rb @@ -63,6 +63,10 @@ class ListStreamQuery # Filter by team handles. Usable only with `issue_stream`. attr_accessor :team_handles + # Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is + # preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.** + attr_accessor :version + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -82,7 +86,8 @@ def self.attribute_map :'states' => :'states', :'storage' => :'storage', :'suspected_causes' => :'suspected_causes', - :'team_handles' => :'team_handles' + :'team_handles' => :'team_handles', + :'version' => :'version' } end @@ -103,7 +108,8 @@ def self.openapi_types :'states' => :'Array', :'storage' => :'String', :'suspected_causes' => :'Array', - :'team_handles' => :'Array' + :'team_handles' => :'Array', + :'version' => :'ListStreamQueryVersion' } end @@ -194,6 +200,10 @@ def initialize(attributes = {}) self.team_handles = value end end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end end # Check to see if the all the properties in the model are valid @@ -291,6 +301,7 @@ def ==(o) storage == o.storage && suspected_causes == o.suspected_causes && team_handles == o.team_handles && + version == o.version && additional_properties == o.additional_properties end @@ -298,7 +309,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [assignee_uuids, clustering_pattern_field_path, compute, data_source, event_size, group_by, indexes, persona, query_string, sort, states, storage, suspected_causes, team_handles, additional_properties].hash + [assignee_uuids, clustering_pattern_field_path, compute, data_source, event_size, group_by, indexes, persona, query_string, sort, states, storage, suspected_causes, team_handles, version, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/list_stream_query_version.rb b/lib/datadog_api_client/v1/models/list_stream_query_version.rb new file mode 100644 index 000000000000..27d925e7eae1 --- /dev/null +++ b/lib/datadog_api_client/v1/models/list_stream_query_version.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is + # preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.** + class ListStreamQueryVersion + include BaseEnumModel + + SEQUENTIAL_QUERY = "sequential_query".freeze + end +end