Skip to content

Commit cb78113

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

18 files changed

Lines changed: 366 additions & 136 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`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-03-20T18:16:51.929Z

cassettes/features/v1/dashboards/Create-a-new-dashboard-with-topology-map-data-streams-widget.yml

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/v1/dashboards/CreateDashboard_2652180930.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
requests: [
2323
DatadogAPIClient::V1::TopologyRequest.new({
2424
request_type: DatadogAPIClient::V1::TopologyRequestType::TOPOLOGY,
25-
query: DatadogAPIClient::V1::TopologyQuery.new({
26-
data_source: DatadogAPIClient::V1::TopologyQueryDataSource::SERVICE_MAP,
25+
query: DatadogAPIClient::V1::TopologyQueryDataStreamsOrServiceMap.new({
26+
data_source: DatadogAPIClient::V1::TopologyQueryDataStreamsOrServiceMapDataSource::SERVICE_MAP,
2727
service: "",
2828
filters: [
2929
"env:none",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Create a new dashboard with topology_map data_streams widget
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
5+
6+
body = DatadogAPIClient::V1::Dashboard.new({
7+
title: "Example-Dashboard",
8+
description: "",
9+
widgets: [
10+
DatadogAPIClient::V1::Widget.new({
11+
layout: DatadogAPIClient::V1::WidgetLayout.new({
12+
x: 0,
13+
y: 0,
14+
width: 47,
15+
height: 15,
16+
}),
17+
definition: DatadogAPIClient::V1::TopologyMapWidgetDefinition.new({
18+
title: "",
19+
title_size: "16",
20+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
21+
type: DatadogAPIClient::V1::TopologyMapWidgetDefinitionType::TOPOLOGY_MAP,
22+
requests: [
23+
DatadogAPIClient::V1::TopologyRequest.new({
24+
request_type: DatadogAPIClient::V1::TopologyRequestType::TOPOLOGY,
25+
query: DatadogAPIClient::V1::TopologyQueryDataStreamsOrServiceMap.new({
26+
data_source: DatadogAPIClient::V1::TopologyQueryDataStreamsOrServiceMapDataSource::DATA_STREAMS,
27+
service: "",
28+
filters: [
29+
"env:prod",
30+
],
31+
query_string: "service:myservice",
32+
}),
33+
}),
34+
],
35+
}),
36+
}),
37+
],
38+
template_variables: [],
39+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
40+
notify_list: [],
41+
})
42+
p api_instance.create_dashboard(body)

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+
}

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,8 @@ def overrides
839839
"v1.topology_map_widget_definition" => "TopologyMapWidgetDefinition",
840840
"v1.topology_map_widget_definition_type" => "TopologyMapWidgetDefinitionType",
841841
"v1.topology_query" => "TopologyQuery",
842-
"v1.topology_query_data_source" => "TopologyQueryDataSource",
842+
"v1.topology_query_data_streams_or_service_map" => "TopologyQueryDataStreamsOrServiceMap",
843+
"v1.topology_query_data_streams_or_service_map_data_source" => "TopologyQueryDataStreamsOrServiceMapDataSource",
843844
"v1.topology_request" => "TopologyRequest",
844845
"v1.topology_request_type" => "TopologyRequestType",
845846
"v1.tree_map_color_by" => "TreeMapColorBy",

lib/datadog_api_client/v1/models/topology_map_widget_definition.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TopologyMapWidgetDefinition
2424
# List of custom links.
2525
attr_accessor :custom_links
2626

27-
# One or more Topology requests.
27+
# One Topology request.
2828
attr_reader :requests
2929

3030
# Title of your widget.

0 commit comments

Comments
 (0)