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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"log": {
"_recordingName": "Dashboards/Create a new dashboard with logs_transaction_stream list_stream widget and version",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "7d2dcbfd4f2570cd30d2db347a6251ab",
"_order": 0,
"cache": {},
"request": {
"bodySize": 487,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 559,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"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\"}}]}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard"
},
"response": {
"bodySize": 905,
"content": {
"mimeType": "application/json",
"size": 905,
"text": "{\"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\":[]}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 380,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2026-06-30T18:19:26.631Z",
"time": 371
},
{
"_id": "6ad9f4e6a51014114aa481cf0551672f",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
}
],
"headersSize": 520,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard/72a-q2p-zau"
},
"response": {
"bodySize": 38,
"content": {
"mimeType": "application/json",
"size": 38,
"text": "{\"deleted_dashboard_id\":\"72a-q2p-zau\"}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 379,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2026-06-30T18:19:27.026Z",
"time": 501
}
],
"pages": [],
"version": "1.2"
}
}
58 changes: 58 additions & 0 deletions examples/v1/dashboards/CreateDashboard_153558925.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* Create a new dashboard with logs_transaction_stream list_stream widget and version
*/

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.DashboardsApi(configuration);

const params: v1.DashboardsApiCreateDashboardRequest = {
body: {
layoutType: "ordered",
title: "Example-Dashboard with list_stream widget",
widgets: [
{
definition: {
type: "list_stream",
requests: [
{
columns: [
{
width: "auto",
field: "timestamp",
},
],
query: {
dataSource: "logs_transaction_stream",
queryString: "",
groupBy: [
{
facet: "service",
},
],
compute: [
{
facet: "service",
aggregation: "count",
},
],
version: "sequential_query",
},
responseFormat: "event_list",
},
],
},
},
],
},
};

apiInstance
.createDashboard(params)
.then((data: v1.Dashboard) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
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 packages/datadog-api-client-v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ export { ListStreamGroupByItems } from "./models/ListStreamGroupByItems";
export { ListStreamIssuePersona } from "./models/ListStreamIssuePersona";
export { ListStreamIssueState } from "./models/ListStreamIssueState";
export { ListStreamQuery } from "./models/ListStreamQuery";
export { ListStreamQueryVersion } from "./models/ListStreamQueryVersion";
export { ListStreamResponseFormat } from "./models/ListStreamResponseFormat";
export { ListStreamSource } from "./models/ListStreamSource";
export { ListStreamWidgetDefinition } from "./models/ListStreamWidgetDefinition";
Expand Down
10 changes: 10 additions & 0 deletions packages/datadog-api-client-v1/models/ListStreamQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ListStreamComputeItems } from "./ListStreamComputeItems";
import { ListStreamGroupByItems } from "./ListStreamGroupByItems";
import { ListStreamIssuePersona } from "./ListStreamIssuePersona";
import { ListStreamIssueState } from "./ListStreamIssueState";
import { ListStreamQueryVersion } from "./ListStreamQueryVersion";
import { ListStreamSource } from "./ListStreamSource";
import { WidgetEventSize } from "./WidgetEventSize";
import { WidgetFieldSort } from "./WidgetFieldSort";
Expand Down Expand Up @@ -73,6 +74,11 @@ export class ListStreamQuery {
* Filter by team handles. Usable only with `issue_stream`.
*/
"teamHandles"?: Array<string>;
/**
* 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.**
*/
"version"?: ListStreamQueryVersion;

/**
* A container for additional, undeclared properties.
Expand Down Expand Up @@ -148,6 +154,10 @@ export class ListStreamQuery {
baseName: "team_handles",
type: "Array<string>",
},
version: {
baseName: "version",
type: "ListStreamQueryVersion",
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
Expand Down
15 changes: 15 additions & 0 deletions packages/datadog-api-client-v1/models/ListStreamQueryVersion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* 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.
*/

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* 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.**
*/

export type ListStreamQueryVersion = typeof SEQUENTIAL_QUERY | UnparsedObject;
export const SEQUENTIAL_QUERY = "sequential_query";
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,7 @@ const enumsMap: { [key: string]: any[] } = {
],
ListStreamIssuePersona: ["all", "browser", "mobile", "backend"],
ListStreamIssueState: ["OPEN", "IGNORED", "ACKNOWLEDGED", "RESOLVED"],
ListStreamQueryVersion: ["sequential_query"],
ListStreamResponseFormat: ["event_list"],
ListStreamSource: [
"logs_stream",
Expand Down
Loading