Skip to content

Commit d12cd1d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 7a70f56 of spec repo (#3432)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 88ae48a commit d12cd1d

File tree

9 files changed

+279
-5
lines changed

9 files changed

+279
-5
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19536,6 +19536,23 @@ components:
1953619536
x-enum-varnames:
1953719537
- BARS
1953819538
- AREA
19539+
TimeseriesRequestStyle:
19540+
description: Define request widget style for timeseries widgets.
19541+
properties:
19542+
has_value_labels:
19543+
description: If true, the value is displayed as a label relative to the
19544+
data point.
19545+
type: boolean
19546+
line_type:
19547+
$ref: '#/components/schemas/WidgetLineType'
19548+
line_width:
19549+
$ref: '#/components/schemas/WidgetLineWidth'
19550+
order_by:
19551+
$ref: '#/components/schemas/WidgetStyleOrderBy'
19552+
palette:
19553+
description: Color palette to apply to the widget.
19554+
type: string
19555+
type: object
1953919556
TimeseriesWidgetDefinition:
1954019557
description: The timeseries visualization allows you to display the evolution
1954119558
of one or more metrics, log events, or Indexed Spans over time.
@@ -19711,7 +19728,7 @@ components:
1971119728
deprecated: true
1971219729
description: Deprecated - Use `queries` and `formulas` instead.
1971319730
style:
19714-
$ref: '#/components/schemas/WidgetRequestStyle'
19731+
$ref: '#/components/schemas/TimeseriesRequestStyle'
1971519732
type: object
1971619733
ToplistWidgetDefinition:
1971719734
description: The top list visualization enables you to display a list of Tag
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-03-02T17:38:31.339Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Create a new dashboard with timeseries widget using has_value_labels",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "9737dfcdb2556e0aa0c569ecc50601a7",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 367,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 559,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_timeseries_widget_using_has_value_labels-1772473111 with has_value_labels\",\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"line\",\"q\":\"avg:system.cpu.user{*} by {host}\",\"style\":{\"has_value_labels\":true,\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"type\":\"timeseries\"}}]}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/dashboard"
39+
},
40+
"response": {
41+
"bodySize": 784,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 784,
45+
"text": "{\"id\":\"ue9-kuc-ix2\",\"title\":\"Test-Create_a_new_dashboard_with_timeseries_widget_using_has_value_labels-1772473111 with has_value_labels\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/ue9-kuc-ix2/test-createanewdashboardwithtimeserieswidgetusinghasvaluelabels-1772473111-with\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"line\",\"q\":\"avg:system.cpu.user{*} by {host}\",\"style\":{\"has_value_labels\":true,\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"type\":\"timeseries\"},\"id\":3800027122356131}],\"notify_list\":null,\"created_at\":\"2026-03-02T17:38:31.488630+00:00\",\"modified_at\":\"2026-03-02T17:38:31.488630+00:00\",\"restricted_roles\":[]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 380,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-03-02T17:38:31.347Z",
61+
"time": 192
62+
},
63+
{
64+
"_id": "f06daf00268667a011d63be15789ac13",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
}
76+
],
77+
"headersSize": 520,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/ue9-kuc-ix2"
82+
},
83+
"response": {
84+
"bodySize": 38,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 38,
88+
"text": "{\"deleted_dashboard_id\":\"ue9-kuc-ix2\"}"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 379,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2026-03-02T17:38:31.547Z",
104+
"time": 402
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Create a new dashboard with timeseries widget using has_value_labels
3+
*/
4+
5+
import { client, v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v1.DashboardsApi(configuration);
9+
10+
const params: v1.DashboardsApiCreateDashboardRequest = {
11+
body: {
12+
layoutType: "ordered",
13+
title: "Example-Dashboard with has_value_labels",
14+
widgets: [
15+
{
16+
definition: {
17+
type: "timeseries",
18+
requests: [
19+
{
20+
q: "avg:system.cpu.user{*} by {host}",
21+
style: {
22+
palette: "dog_classic",
23+
lineType: "solid",
24+
lineWidth: "normal",
25+
hasValueLabels: true,
26+
},
27+
displayType: "line",
28+
},
29+
],
30+
},
31+
},
32+
],
33+
},
34+
};
35+
36+
apiInstance
37+
.createDashboard(params)
38+
.then((data: v1.Dashboard) => {
39+
console.log(
40+
"API called successfully. Returned data: " + JSON.stringify(data)
41+
);
42+
})
43+
.catch((error: any) => console.error(error));

features/v1/dashboards.feature

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,17 @@ Feature: Dashboards
966966
And the response "widgets[0].definition.requests[0].display_type" is equal to "bars"
967967
And the response "widgets[0].definition.requests[0].q" is equal to "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()"
968968

969+
@team:DataDog/dashboards-backend
970+
Scenario: Create a new dashboard with timeseries widget using has_value_labels
971+
Given new "CreateDashboard" request
972+
And body with value {"layout_type": "ordered", "title": "{{ unique }} with has_value_labels","widgets": [{"definition": {"type": "timeseries","requests": [{"q": "avg:system.cpu.user{*} by {host}","style": {"palette": "dog_classic","line_type": "solid","line_width": "normal","has_value_labels": true},"display_type": "line"}]}}]}
973+
When the request is sent
974+
Then the response status is 200 OK
975+
And the response "widgets[0].definition.requests[0].style.has_value_labels" is equal to true
976+
And the response "widgets[0].definition.requests[0].style.palette" is equal to "dog_classic"
977+
And the response "widgets[0].definition.requests[0].style.line_type" is equal to "solid"
978+
And the response "widgets[0].definition.requests[0].style.line_width" is equal to "normal"
979+
969980
@team:DataDog/dashboards-backend
970981
Scenario: Create a new dashboard with timeseries widget using order_by tags
971982
Given new "CreateDashboard" request

packages/datadog-api-client-v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,7 @@ export { TagToHosts } from "./models/TagToHosts";
11211121
export { TargetFormatType } from "./models/TargetFormatType";
11221122
export { TimeseriesBackground } from "./models/TimeseriesBackground";
11231123
export { TimeseriesBackgroundType } from "./models/TimeseriesBackgroundType";
1124+
export { TimeseriesRequestStyle } from "./models/TimeseriesRequestStyle";
11241125
export { TimeseriesWidgetDefinition } from "./models/TimeseriesWidgetDefinition";
11251126
export { TimeseriesWidgetDefinitionType } from "./models/TimeseriesWidgetDefinitionType";
11261127
export { TimeseriesWidgetExpressionAlias } from "./models/TimeseriesWidgetExpressionAlias";

packages/datadog-api-client-v1/models/ObjectSerializer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ import { TableWidgetTextFormatReplaceSubstring } from "./TableWidgetTextFormatRe
543543
import { TableWidgetTextFormatRule } from "./TableWidgetTextFormatRule";
544544
import { TagToHosts } from "./TagToHosts";
545545
import { TimeseriesBackground } from "./TimeseriesBackground";
546+
import { TimeseriesRequestStyle } from "./TimeseriesRequestStyle";
546547
import { TimeseriesWidgetDefinition } from "./TimeseriesWidgetDefinition";
547548
import { TimeseriesWidgetExpressionAlias } from "./TimeseriesWidgetExpressionAlias";
548549
import { TimeseriesWidgetRequest } from "./TimeseriesWidgetRequest";
@@ -2371,6 +2372,7 @@ const typeMap: { [index: string]: any } = {
23712372
TableWidgetTextFormatRule: TableWidgetTextFormatRule,
23722373
TagToHosts: TagToHosts,
23732374
TimeseriesBackground: TimeseriesBackground,
2375+
TimeseriesRequestStyle: TimeseriesRequestStyle,
23742376
TimeseriesWidgetDefinition: TimeseriesWidgetDefinition,
23752377
TimeseriesWidgetExpressionAlias: TimeseriesWidgetExpressionAlias,
23762378
TimeseriesWidgetRequest: TimeseriesWidgetRequest,
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
import { WidgetLineType } from "./WidgetLineType";
7+
import { WidgetLineWidth } from "./WidgetLineWidth";
8+
import { WidgetStyleOrderBy } from "./WidgetStyleOrderBy";
9+
10+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
11+
12+
/**
13+
* Define request widget style for timeseries widgets.
14+
*/
15+
export class TimeseriesRequestStyle {
16+
/**
17+
* If true, the value is displayed as a label relative to the data point.
18+
*/
19+
"hasValueLabels"?: boolean;
20+
/**
21+
* Type of lines displayed.
22+
*/
23+
"lineType"?: WidgetLineType;
24+
/**
25+
* Width of line displayed.
26+
*/
27+
"lineWidth"?: WidgetLineWidth;
28+
/**
29+
* How to order series in timeseries visualizations.
30+
* - `tags`: Order series alphabetically by tag name (default behavior)
31+
* - `values`: Order series by their current metric values (typically descending)
32+
*/
33+
"orderBy"?: WidgetStyleOrderBy;
34+
/**
35+
* Color palette to apply to the widget.
36+
*/
37+
"palette"?: string;
38+
39+
/**
40+
* A container for additional, undeclared properties.
41+
* This is a holder for any undeclared properties as specified with
42+
* the 'additionalProperties' keyword in the OAS document.
43+
*/
44+
"additionalProperties"?: { [key: string]: any };
45+
46+
/**
47+
* @ignore
48+
*/
49+
"_unparsed"?: boolean;
50+
51+
/**
52+
* @ignore
53+
*/
54+
static readonly attributeTypeMap: AttributeTypeMap = {
55+
hasValueLabels: {
56+
baseName: "has_value_labels",
57+
type: "boolean",
58+
},
59+
lineType: {
60+
baseName: "line_type",
61+
type: "WidgetLineType",
62+
},
63+
lineWidth: {
64+
baseName: "line_width",
65+
type: "WidgetLineWidth",
66+
},
67+
orderBy: {
68+
baseName: "order_by",
69+
type: "WidgetStyleOrderBy",
70+
},
71+
palette: {
72+
baseName: "palette",
73+
type: "string",
74+
},
75+
additionalProperties: {
76+
baseName: "additionalProperties",
77+
type: "{ [key: string]: any; }",
78+
},
79+
};
80+
81+
/**
82+
* @ignore
83+
*/
84+
static getAttributeTypeMap(): AttributeTypeMap {
85+
return TimeseriesRequestStyle.attributeTypeMap;
86+
}
87+
88+
public constructor() {}
89+
}

packages/datadog-api-client-v1/models/TimeseriesWidgetRequest.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { FormulaAndFunctionQueryDefinition } from "./FormulaAndFunctionQueryDefi
77
import { FormulaAndFunctionResponseFormat } from "./FormulaAndFunctionResponseFormat";
88
import { LogQueryDefinition } from "./LogQueryDefinition";
99
import { ProcessQueryDefinition } from "./ProcessQueryDefinition";
10+
import { TimeseriesRequestStyle } from "./TimeseriesRequestStyle";
1011
import { TimeseriesWidgetExpressionAlias } from "./TimeseriesWidgetExpressionAlias";
1112
import { WidgetDisplayType } from "./WidgetDisplayType";
1213
import { WidgetFormula } from "./WidgetFormula";
13-
import { WidgetRequestStyle } from "./WidgetRequestStyle";
1414

1515
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1616

@@ -83,9 +83,9 @@ export class TimeseriesWidgetRequest {
8383
*/
8484
"securityQuery"?: LogQueryDefinition;
8585
/**
86-
* Define request widget style.
86+
* Define request widget style for timeseries widgets.
8787
*/
88-
"style"?: WidgetRequestStyle;
88+
"style"?: TimeseriesRequestStyle;
8989

9090
/**
9191
* A container for additional, undeclared properties.
@@ -169,7 +169,7 @@ export class TimeseriesWidgetRequest {
169169
},
170170
style: {
171171
baseName: "style",
172-
type: "WidgetRequestStyle",
172+
type: "TimeseriesRequestStyle",
173173
},
174174
additionalProperties: {
175175
baseName: "additionalProperties",

0 commit comments

Comments
 (0)