Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-06-30T18:19:26.621Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions examples/v1/dashboards/CreateDashboard_153558925.rb
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 9 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
17 changes: 14 additions & 3 deletions lib/datadog_api_client/v1/models/list_stream_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand All @@ -103,7 +108,8 @@ def self.openapi_types
:'states' => :'Array<ListStreamIssueState>',
:'storage' => :'String',
:'suspected_causes' => :'Array<String>',
:'team_handles' => :'Array<String>'
:'team_handles' => :'Array<String>',
:'version' => :'ListStreamQueryVersion'
}
end

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -291,14 +301,15 @@ def ==(o)
storage == o.storage &&
suspected_causes == o.suspected_causes &&
team_handles == o.team_handles &&
version == o.version &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @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
27 changes: 27 additions & 0 deletions lib/datadog_api_client/v1/models/list_stream_query_version.rb
Original file line number Diff line number Diff line change
@@ -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
Loading