Skip to content

Commit ad23367

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3750afc of spec repo
1 parent 187171f commit ad23367

19 files changed

Lines changed: 330 additions & 80 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18843,7 +18843,7 @@ components:
1884318843
$ref: "#/components/schemas/WidgetCustomLink"
1884418844
type: array
1884518845
requests:
18846-
description: One or more Topology requests.
18846+
description: One Topology request.
1884718847
items:
1884818848
$ref: "#/components/schemas/TopologyRequest"
1884918849
minItems: 1
@@ -18872,10 +18872,14 @@ components:
1887218872
x-enum-varnames:
1887318873
- TOPOLOGY_MAP
1887418874
TopologyQuery:
18875+
description: A topology data source query.
18876+
oneOf:
18877+
- $ref: "#/components/schemas/TopologyQueryDataStreamsOrServiceMap"
18878+
TopologyQueryDataStreamsOrServiceMap:
1887518879
description: Query to service-based topology data sources like the service map or data streams.
1887618880
properties:
1887718881
data_source:
18878-
$ref: "#/components/schemas/TopologyQueryDataSource"
18882+
$ref: "#/components/schemas/TopologyQueryDataStreamsOrServiceMapDataSource"
1887918883
filters:
1888018884
description: Your environment and primary tag (or * if enabled for your account).
1888118885
example: ["env:prod", "az:us-east"]
@@ -18884,16 +18888,24 @@ components:
1888418888
type: string
1888518889
minItems: 1
1888618890
type: array
18891+
query_string:
18892+
description: A search string for filtering services, used in `data_streams` queries only. When set, this replaces the `service` field
18893+
example: "service:myservice"
18894+
type: string
1888718895
service:
1888818896
description: Name of the service
18889-
example: myService
18897+
example: myservice
1889018898
type: string
18899+
required:
18900+
- data_source
18901+
- filters
1889118902
type: object
18892-
TopologyQueryDataSource:
18903+
TopologyQueryDataStreamsOrServiceMapDataSource:
1889318904
description: Name of the data source
1889418905
enum:
1889518906
- data_streams
1889618907
- service_map
18908+
example: data_streams
1889718909
type: string
1889818910
x-enum-varnames:
1889918911
- DATA_STREAMS

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56896,7 +56896,7 @@ components:
5689656896
$ref: "#/components/schemas/SecurityMonitoringCriticalAsset"
5689756897
type: object
5689856898
SecurityMonitoringCriticalAssetSeverity:
56899-
description: Severity associated with this critical asset. Either an explicit severity can be set, or the severity can be increased or decreased, or the severity can be left unchanged (no-op).
56899+
description: Severity associated with this critical asset. Either an explicit severity can be set, or the severity can be increased or decreased.
5690056900
enum:
5690156901
- info
5690256902
- low
@@ -56905,7 +56905,6 @@ components:
5690556905
- critical
5690656906
- increase
5690756907
- decrease
56908-
- no-op
5690956908
example: increase
5691056909
type: string
5691156910
x-enum-varnames:
@@ -56916,7 +56915,6 @@ components:
5691656915
- CRITICAL
5691756916
- INCREASE
5691856917
- DECREASE
56919-
- NO_OP
5692056918
SecurityMonitoringCriticalAssetType:
5692156919
default: critical_assets
5692256920
description: The type of the resource. The value should always be `critical_assets`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-03-20T18:16:51.929Z"
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Create a new dashboard with topology_map data_streams widget",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "5ef852d7c1bccb279d3a40ee81b48bd4",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 465,
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": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_topology_map_data_streams_widget-1774030611\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"data_streams\",\"filters\":[\"env:prod\"],\"query_string\":\"service:myservice\",\"service\":\"\"},\"request_type\":\"topology\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"topology_map\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/dashboard"
39+
},
40+
"response": {
41+
"bodySize": 806,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 806,
45+
"text": "{\"id\":\"whr-253-7we\",\"title\":\"Test-Create_a_new_dashboard_with_topology_map_data_streams_widget-1774030611\",\"description\":\"\",\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"free\",\"url\":\"/dashboard/whr-253-7we/test-createanewdashboardwithtopologymapdatastreamswidget-1774030611\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"data_streams\",\"filters\":[\"env:prod\"],\"query_string\":\"service:myservice\",\"service\":\"\"},\"request_type\":\"topology\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"topology_map\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":1843670487553482}],\"notify_list\":[],\"created_at\":\"2026-03-20T18:16:52.209473+00:00\",\"modified_at\":\"2026-03-20T18:16:52.209473+00:00\",\"restricted_roles\":[]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 379,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-03-20T18:16:51.938Z",
61+
"time": 367
62+
},
63+
{
64+
"_id": "33d0dcbd89c8bfed97293770bde62baa",
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/whr-253-7we"
82+
},
83+
"response": {
84+
"bodySize": 38,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 38,
88+
"text": "{\"deleted_dashboard_id\":\"whr-253-7we\"}"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 378,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2026-03-20T18:16:52.316Z",
104+
"time": 566
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**
2+
* Create a new dashboard with topology_map data_streams widget
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+
title: "Example-Dashboard",
13+
description: "",
14+
widgets: [
15+
{
16+
layout: {
17+
x: 0,
18+
y: 0,
19+
width: 47,
20+
height: 15,
21+
},
22+
definition: {
23+
title: "",
24+
titleSize: "16",
25+
titleAlign: "left",
26+
type: "topology_map",
27+
requests: [
28+
{
29+
requestType: "topology",
30+
query: {
31+
dataSource: "data_streams",
32+
service: "",
33+
filters: ["env:prod"],
34+
queryString: "service:myservice",
35+
},
36+
},
37+
],
38+
},
39+
},
40+
],
41+
templateVariables: [],
42+
layoutType: "free",
43+
notifyList: [],
44+
},
45+
};
46+
47+
apiInstance
48+
.createDashboard(params)
49+
.then((data: v1.Dashboard) => {
50+
console.log(
51+
"API called successfully. Returned data: " + JSON.stringify(data)
52+
);
53+
})
54+
.catch((error: any) => console.error(error));

features/v1/dashboards.feature

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,19 @@ Feature: Dashboards
10281028
And the response "widgets[0].definition.requests[0].sort.order_by[0].type" is equal to "formula"
10291029
And the response "widgets[0].definition.requests[0].sort.order_by[0].index" is equal to 0
10301030

1031+
@team:DataDog/dashboards-backend
1032+
Scenario: Create a new dashboard with topology_map data_streams widget
1033+
Given new "CreateDashboard" request
1034+
And body from file "dashboards_json_payload/topology_map_widget_data_streams.json"
1035+
When the request is sent
1036+
Then the response status is 200 OK
1037+
And the response "widgets[0].definition.type" is equal to "topology_map"
1038+
And the response "widgets[0].definition.requests[0].request_type" is equal to "topology"
1039+
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "data_streams"
1040+
And the response "widgets[0].definition.requests[0].query.service" is equal to ""
1041+
And the response "widgets[0].definition.requests[0].query.filters" is equal to ["env:prod"]
1042+
And the response "widgets[0].definition.requests[0].query.query_string" is equal to "service:myservice"
1043+
10311044
@team:DataDog/dashboards-backend
10321045
Scenario: Create a new dashboard with topology_map widget
10331046
Given new "CreateDashboard" request
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"title": "{{ unique }}",
3+
"description": "",
4+
"widgets": [
5+
{
6+
"layout": {
7+
"x": 0,
8+
"y": 0,
9+
"width": 47,
10+
"height": 15
11+
},
12+
"definition": {
13+
"title": "",
14+
"title_size": "16",
15+
"title_align": "left",
16+
"type": "topology_map",
17+
"requests": [
18+
{
19+
"request_type": "topology",
20+
"query": {
21+
"data_source": "data_streams",
22+
"service": "",
23+
"filters": ["env:prod"],
24+
"query_string": "service:myservice"
25+
}
26+
}
27+
]
28+
}
29+
}
30+
],
31+
"template_variables": [],
32+
"layout_type": "free",
33+
"notify_list": []
34+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,8 @@ export { ToplistWidgetStyle } from "./models/ToplistWidgetStyle";
11611161
export { TopologyMapWidgetDefinition } from "./models/TopologyMapWidgetDefinition";
11621162
export { TopologyMapWidgetDefinitionType } from "./models/TopologyMapWidgetDefinitionType";
11631163
export { TopologyQuery } from "./models/TopologyQuery";
1164-
export { TopologyQueryDataSource } from "./models/TopologyQueryDataSource";
1164+
export { TopologyQueryDataStreamsOrServiceMap } from "./models/TopologyQueryDataStreamsOrServiceMap";
1165+
export { TopologyQueryDataStreamsOrServiceMapDataSource } from "./models/TopologyQueryDataStreamsOrServiceMapDataSource";
11651166
export { TopologyRequest } from "./models/TopologyRequest";
11661167
export { TopologyRequestType } from "./models/TopologyRequestType";
11671168
export { TreeMapColorBy } from "./models/TreeMapColorBy";

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ import { ToplistWidgetRequest } from "./ToplistWidgetRequest";
562562
import { ToplistWidgetStacked } from "./ToplistWidgetStacked";
563563
import { ToplistWidgetStyle } from "./ToplistWidgetStyle";
564564
import { TopologyMapWidgetDefinition } from "./TopologyMapWidgetDefinition";
565-
import { TopologyQuery } from "./TopologyQuery";
565+
import { TopologyQueryDataStreamsOrServiceMap } from "./TopologyQueryDataStreamsOrServiceMap";
566566
import { TopologyRequest } from "./TopologyRequest";
567567
import { TreeMapWidgetDefinition } from "./TreeMapWidgetDefinition";
568568
import { TreeMapWidgetRequest } from "./TreeMapWidgetRequest";
@@ -1685,7 +1685,10 @@ const enumsMap: { [key: string]: any[] } = {
16851685
ToplistWidgetScaling: ["absolute", "relative"],
16861686
ToplistWidgetStackedType: ["stacked"],
16871687
TopologyMapWidgetDefinitionType: ["topology_map"],
1688-
TopologyQueryDataSource: ["data_streams", "service_map"],
1688+
TopologyQueryDataStreamsOrServiceMapDataSource: [
1689+
"data_streams",
1690+
"service_map",
1691+
],
16891692
TopologyRequestType: ["topology"],
16901693
TreeMapColorBy: ["user"],
16911694
TreeMapGroupBy: ["user", "family", "process"],
@@ -2435,7 +2438,7 @@ const typeMap: { [index: string]: any } = {
24352438
ToplistWidgetStacked: ToplistWidgetStacked,
24362439
ToplistWidgetStyle: ToplistWidgetStyle,
24372440
TopologyMapWidgetDefinition: TopologyMapWidgetDefinition,
2438-
TopologyQuery: TopologyQuery,
2441+
TopologyQueryDataStreamsOrServiceMap: TopologyQueryDataStreamsOrServiceMap,
24392442
TopologyRequest: TopologyRequest,
24402443
TreeMapWidgetDefinition: TreeMapWidgetDefinition,
24412444
TreeMapWidgetRequest: TreeMapWidgetRequest,
@@ -2709,6 +2712,7 @@ const oneOfMap: { [index: string]: string[] } = {
27092712
"TableWidgetTextFormatReplaceSubstring",
27102713
],
27112714
ToplistWidgetDisplay: ["ToplistWidgetStacked", "ToplistWidgetFlat"],
2715+
TopologyQuery: ["TopologyQueryDataStreamsOrServiceMap"],
27122716
WidgetDefinition: [
27132717
"AlertGraphWidgetDefinition",
27142718
"AlertValueWidgetDefinition",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class TopologyMapWidgetDefinition {
1919
*/
2020
"customLinks"?: Array<WidgetCustomLink>;
2121
/**
22-
* One or more Topology requests.
22+
* One Topology request.
2323
*/
2424
"requests": Array<TopologyRequest>;
2525
/**

0 commit comments

Comments
 (0)