diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 7ffcafb30797..07f7a3013678 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/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 731b9e51606d..488b7e209c2a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -36996,7 +36996,11 @@ components: attributes: $ref: "#/components/schemas/FlakyTestAttributes" id: - description: Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. On the Test Runs UI it is the same as the `test_fingerprint_fqn` tag. + description: |- + Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. It is the + value of the `@test.fingerprint_fqn` facet on test events, which you can search on in the Test + Optimization Explorer to locate a specific test. To filter search results by this ID, use the + `fingerprint_fqn` search key. type: string type: $ref: "#/components/schemas/FlakyTestType" @@ -37378,6 +37382,9 @@ components: - `@git.branch` - `@test.codeowners` - `env` + - `fingerprint_fqn` + + Use `fingerprint_fqn` to filter by a test's stable Fingerprint FQN (the same value as the test's `id`). example: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"' type: string type: object @@ -106707,7 +106714,11 @@ components: description: Details of what tests to update and their new attributes. properties: id: - description: The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events. + description: |- + The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and is the + value of the `@test.fingerprint_fqn` facet on test events. You can find it by searching on + `@test.fingerprint_fqn` in the Test Optimization Explorer, or by filtering the Search flaky tests + endpoint with the `fingerprint_fqn` key. example: 4eb1887a8adb1847 type: string new_state: @@ -106777,7 +106788,10 @@ components: description: Error message if the update failed. type: string id: - description: The ID of the flaky test from the request. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events. + description: |- + The ID of the flaky test from the request. This is the value of the `@test.fingerprint_fqn` facet + on test events, the same ID accepted by the update request and returned by the Search flaky tests + endpoint. example: 4eb1887a8adb1847 type: string success: 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 87d4548ec52d..84127ecb7d73 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 diff --git a/lib/datadog_api_client/v2/models/flaky_test.rb b/lib/datadog_api_client/v2/models/flaky_test.rb index ca3c7a8f9018..c4dd8e9de9af 100644 --- a/lib/datadog_api_client/v2/models/flaky_test.rb +++ b/lib/datadog_api_client/v2/models/flaky_test.rb @@ -24,7 +24,10 @@ class FlakyTest # Attributes of a flaky test. attr_accessor :attributes - # Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. On the Test Runs UI it is the same as the `test_fingerprint_fqn` tag. + # Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. It is the + # value of the `@test.fingerprint_fqn` facet on test events, which you can search on in the Test + # Optimization Explorer to locate a specific test. To filter search results by this ID, use the + # `fingerprint_fqn` search key. attr_accessor :id # The type of the flaky test from Flaky Test Management. diff --git a/lib/datadog_api_client/v2/models/flaky_tests_search_filter.rb b/lib/datadog_api_client/v2/models/flaky_tests_search_filter.rb index 64751326ec53..704199050a7c 100644 --- a/lib/datadog_api_client/v2/models/flaky_tests_search_filter.rb +++ b/lib/datadog_api_client/v2/models/flaky_tests_search_filter.rb @@ -37,6 +37,9 @@ class FlakyTestsSearchFilter # - `@git.branch` # - `@test.codeowners` # - `env` + # - `fingerprint_fqn` + # + # Use `fingerprint_fqn` to filter by a test's stable Fingerprint FQN (the same value as the test's `id`). attr_accessor :query attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/update_flaky_tests_request_test.rb b/lib/datadog_api_client/v2/models/update_flaky_tests_request_test.rb index 28a667b05246..05152375a76d 100644 --- a/lib/datadog_api_client/v2/models/update_flaky_tests_request_test.rb +++ b/lib/datadog_api_client/v2/models/update_flaky_tests_request_test.rb @@ -21,7 +21,10 @@ module DatadogAPIClient::V2 class UpdateFlakyTestsRequestTest include BaseGenericModel - # The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events. + # The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and is the + # value of the `@test.fingerprint_fqn` facet on test events. You can find it by searching on + # `@test.fingerprint_fqn` in the Test Optimization Explorer, or by filtering the Search flaky tests + # endpoint with the `fingerprint_fqn` key. attr_reader :id # The new state to set for the flaky test. diff --git a/lib/datadog_api_client/v2/models/update_flaky_tests_response_result.rb b/lib/datadog_api_client/v2/models/update_flaky_tests_response_result.rb index 3dab004db158..0d0c86eaa0b7 100644 --- a/lib/datadog_api_client/v2/models/update_flaky_tests_response_result.rb +++ b/lib/datadog_api_client/v2/models/update_flaky_tests_response_result.rb @@ -24,7 +24,9 @@ class UpdateFlakyTestsResponseResult # Error message if the update failed. attr_accessor :error - # The ID of the flaky test from the request. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events. + # The ID of the flaky test from the request. This is the value of the `@test.fingerprint_fqn` facet + # on test events, the same ID accepted by the update request and returned by the Search flaky tests + # endpoint. attr_reader :id # `True` if the update was successful, `False` if there were any errors.