Skip to content

Commit c7f3504

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 9841481 of spec repo (#328)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 4da422d commit c7f3504

File tree

5 files changed

+296
-4
lines changed

5 files changed

+296
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.5.1.dev2",
7-
"regenerated": "2021-10-18 10:35:01.899116",
8-
"spec_repo_commit": "303d2e3"
7+
"regenerated": "2021-10-19 14:10:49.305059",
8+
"spec_repo_commit": "9841481"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-10-18 10:35:54.612531",
13-
"spec_repo_commit": "303d2e3"
12+
"regenerated": "2021-10-19 14:12:00.668497",
13+
"spec_repo_commit": "9841481"
1414
}
1515
}
1616
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2021-10-19T13:33:46.857Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Create a new dashboard with distribution widget and apm stats data",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "5.1.0"
8+
},
9+
"entries": [
10+
{
11+
"_id": "b2ce339c076ea4c19ba9111a9965936e",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 410,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "user-agent",
21+
"value": "datadog-api-client-typescript/1.0.0-beta.5 (node 14.18.0; os Linux; arch x64)"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "accept",
26+
"value": "application/json, */*;q=0.8"
27+
},
28+
{
29+
"_fromType": "array",
30+
"name": "content-type",
31+
"value": "application/json"
32+
},
33+
{
34+
"_fromType": "array",
35+
"name": "x-datadog-parent-id",
36+
"value": "8268861117747843641"
37+
},
38+
{
39+
"_fromType": "array",
40+
"name": "x-datadog-trace-id",
41+
"value": "2389969289727081344"
42+
},
43+
{
44+
"_fromType": "array",
45+
"name": "content-length",
46+
"value": "410"
47+
},
48+
{
49+
"_fromType": "array",
50+
"name": "connection",
51+
"value": "close"
52+
},
53+
{
54+
"name": "host",
55+
"value": "api.datadoghq.com"
56+
}
57+
],
58+
"headersSize": 476,
59+
"httpVersion": "HTTP/1.1",
60+
"method": "POST",
61+
"postData": {
62+
"mimeType": "application/json",
63+
"params": [],
64+
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_distribution_widget_and_apm_stats_data-1634650426\",\"widgets\":[{\"definition\":{\"requests\":[{\"apm_stats_query\":{\"env\":\"prod\",\"name\":\"cassandra.query\",\"primary_tag\":\"datacenter:dc1\",\"row_type\":\"service\",\"service\":\"cassandra\"}}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}"
65+
},
66+
"queryString": [],
67+
"url": "https://api.datadoghq.com/api/v1/dashboard"
68+
},
69+
"response": {
70+
"bodySize": 815,
71+
"content": {
72+
"mimeType": "application/json",
73+
"size": 815,
74+
"text": "{\"notify_list\":null,\"description\":null,\"restricted_roles\":[],\"author_name\":null,\"template_variables\":null,\"is_read_only\":false,\"id\":\"4rp-6dh-ihs\",\"title\":\"Test-Create_a_new_dashboard_with_distribution_widget_and_apm_stats_data-1634650426\",\"url\":\"/dashboard/4rp-6dh-ihs/test-createanewdashboardwithdistributionwidgetandapmstatsdata-1634650426\",\"created_at\":\"2021-10-19T13:33:47.501264+00:00\",\"modified_at\":\"2021-10-19T13:33:47.501264+00:00\",\"author_handle\":\"[email protected]\",\"widgets\":[{\"definition\":{\"type\":\"distribution\",\"requests\":[{\"apm_stats_query\":{\"primary_tag\":\"datacenter:dc1\",\"row_type\":\"service\",\"name\":\"cassandra.query\",\"service\":\"cassandra\",\"env\":\"prod\"}}],\"title_align\":\"left\",\"title_size\":\"16\",\"title\":\"\"},\"layout\":{\"y\":0,\"width\":4,\"x\":0,\"height\":4},\"id\":5954793079374026}],\"layout_type\":\"ordered\"}"
75+
},
76+
"cookies": [],
77+
"headers": [
78+
{
79+
"name": "date",
80+
"value": "Tue, 19 Oct 2021 13:33:47 GMT"
81+
},
82+
{
83+
"name": "content-type",
84+
"value": "application/json"
85+
},
86+
{
87+
"name": "content-length",
88+
"value": "815"
89+
},
90+
{
91+
"name": "connection",
92+
"value": "close"
93+
},
94+
{
95+
"name": "vary",
96+
"value": "Accept-Encoding"
97+
},
98+
{
99+
"name": "pragma",
100+
"value": "no-cache"
101+
},
102+
{
103+
"name": "cache-control",
104+
"value": "no-cache"
105+
},
106+
{
107+
"name": "x-content-type-options",
108+
"value": "nosniff"
109+
},
110+
{
111+
"name": "strict-transport-security",
112+
"value": "max-age=15724800;"
113+
},
114+
{
115+
"name": "content-security-policy",
116+
"value": "frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report"
117+
},
118+
{
119+
"name": "x-frame-options",
120+
"value": "SAMEORIGIN"
121+
}
122+
],
123+
"headersSize": 383,
124+
"httpVersion": "HTTP/1.1",
125+
"redirectURL": "",
126+
"status": 200,
127+
"statusText": "OK"
128+
},
129+
"startedDateTime": "2021-10-19T13:33:46.890Z",
130+
"time": 690,
131+
"timings": {
132+
"blocked": -1,
133+
"connect": -1,
134+
"dns": -1,
135+
"receive": 0,
136+
"send": 0,
137+
"ssl": -1,
138+
"wait": 690
139+
}
140+
},
141+
{
142+
"_id": "1ed76c030939fbad30c04abc418068a4",
143+
"_order": 0,
144+
"cache": {},
145+
"request": {
146+
"bodySize": 0,
147+
"cookies": [],
148+
"headers": [
149+
{
150+
"_fromType": "array",
151+
"name": "user-agent",
152+
"value": "datadog-api-client-typescript/1.0.0-beta.5 (node 14.18.0; os Linux; arch x64)"
153+
},
154+
{
155+
"_fromType": "array",
156+
"name": "accept",
157+
"value": "application/json, */*;q=0.8"
158+
},
159+
{
160+
"_fromType": "array",
161+
"name": "x-datadog-parent-id",
162+
"value": "5067932317896081809"
163+
},
164+
{
165+
"_fromType": "array",
166+
"name": "x-datadog-trace-id",
167+
"value": "2389969289727081344"
168+
},
169+
{
170+
"_fromType": "array",
171+
"name": "connection",
172+
"value": "close"
173+
},
174+
{
175+
"name": "host",
176+
"value": "api.datadoghq.com"
177+
}
178+
],
179+
"headersSize": 437,
180+
"httpVersion": "HTTP/1.1",
181+
"method": "DELETE",
182+
"queryString": [],
183+
"url": "https://api.datadoghq.com/api/v1/dashboard/4rp-6dh-ihs"
184+
},
185+
"response": {
186+
"bodySize": 38,
187+
"content": {
188+
"mimeType": "application/json",
189+
"size": 38,
190+
"text": "{\"deleted_dashboard_id\":\"4rp-6dh-ihs\"}"
191+
},
192+
"cookies": [],
193+
"headers": [
194+
{
195+
"name": "date",
196+
"value": "Tue, 19 Oct 2021 13:33:48 GMT"
197+
},
198+
{
199+
"name": "content-type",
200+
"value": "application/json"
201+
},
202+
{
203+
"name": "content-length",
204+
"value": "38"
205+
},
206+
{
207+
"name": "connection",
208+
"value": "close"
209+
},
210+
{
211+
"name": "vary",
212+
"value": "Accept-Encoding"
213+
},
214+
{
215+
"name": "pragma",
216+
"value": "no-cache"
217+
},
218+
{
219+
"name": "cache-control",
220+
"value": "no-cache"
221+
},
222+
{
223+
"name": "x-content-type-options",
224+
"value": "nosniff"
225+
},
226+
{
227+
"name": "strict-transport-security",
228+
"value": "max-age=15724800;"
229+
},
230+
{
231+
"name": "content-security-policy",
232+
"value": "frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report"
233+
},
234+
{
235+
"name": "x-frame-options",
236+
"value": "SAMEORIGIN"
237+
}
238+
],
239+
"headersSize": 382,
240+
"httpVersion": "HTTP/1.1",
241+
"redirectURL": "",
242+
"status": 200,
243+
"statusText": "OK"
244+
},
245+
"startedDateTime": "2021-10-19T13:33:47.603Z",
246+
"time": 554,
247+
"timings": {
248+
"blocked": -1,
249+
"connect": -1,
250+
"dns": -1,
251+
"receive": 0,
252+
"send": 0,
253+
"ssl": -1,
254+
"wait": 554
255+
}
256+
}
257+
],
258+
"pages": [],
259+
"version": "1.2"
260+
}
261+
}

features/v1/dashboards.feature

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ Feature: Dashboards
7373
And the response "widgets[0].definition.requests[0].queries[0].primary_tag_name" is equal to "datacenter"
7474
And the response "widgets[0].definition.requests[0].queries[0].operation_name" is equal to "cassandra.query"
7575

76+
Scenario: Create a new dashboard with distribution widget and apm stats data
77+
Given new "CreateDashboard" request
78+
And body with value { "title": "{{ unique }}", "widgets": [{"definition": { "title": "", "title_size": "16", "title_align": "left", "type": "distribution", "requests": [{ "apm_stats_query": { "env": "prod", "service": "cassandra", "name": "cassandra.query", "primary_tag": "datacenter:dc1", "row_type": "service" }}] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" }
79+
When the request is sent
80+
Then the response status is 200 OK
81+
And the response "widgets[0].definition.requests[0].apm_stats_query.primary_tag" is equal to "datacenter:dc1"
82+
And the response "widgets[0].definition.requests[0].apm_stats_query.row_type" is equal to "service"
83+
And the response "widgets[0].definition.requests[0].apm_stats_query.env" is equal to "prod"
84+
And the response "widgets[0].definition.requests[0].apm_stats_query.service" is equal to "cassandra"
85+
And the response "widgets[0].definition.requests[0].apm_stats_query.name" is equal to "cassandra.query"
86+
7687
Scenario: Create a new dashboard with formulas and functions scatterplot widget
7788
Given new "CreateDashboard" request
7889
And body with value { "title": "{{ unique }}", "widgets": [ { "id": 5346764334358972, "definition": { "title": "", "title_size": "16", "title_align": "left", "type": "scatterplot", "requests": { "table": { "formulas": [ { "formula": "query1", "dimension": "x", "alias": "my-query1" }, { "formula": "query2", "dimension": "y", "alias": "my-query2" } ], "queries": [ { "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {service}", "aggregator": "avg" }, { "data_source": "metrics", "name": "query2", "query": "avg:system.mem.used{*} by {service}", "aggregator": "avg" } ], "response_format": "scalar" } } }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" }

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Do not edit the class manually.
99
*/
1010

11+
import { ApmStatsQueryDefinition } from "./ApmStatsQueryDefinition";
1112
import { LogQueryDefinition } from "./LogQueryDefinition";
1213
import { ProcessQueryDefinition } from "./ProcessQueryDefinition";
1314
import { WidgetStyle } from "./WidgetStyle";
@@ -19,6 +20,7 @@ import { ObjectSerializer } from "./ObjectSerializer";
1920

2021
export class DistributionWidgetRequest {
2122
"apmQuery"?: LogQueryDefinition;
23+
"apmStatsQuery"?: ApmStatsQueryDefinition;
2224
"eventQuery"?: LogQueryDefinition;
2325
"logQuery"?: LogQueryDefinition;
2426
"networkQuery"?: LogQueryDefinition;
@@ -44,6 +46,11 @@ export class DistributionWidgetRequest {
4446
type: "LogQueryDefinition",
4547
format: "",
4648
},
49+
apmStatsQuery: {
50+
baseName: "apm_stats_query",
51+
type: "ApmStatsQueryDefinition",
52+
format: "",
53+
},
4754
eventQuery: {
4855
baseName: "event_query",
4956
type: "LogQueryDefinition",
@@ -104,6 +111,12 @@ export class DistributionWidgetRequest {
104111
""
105112
);
106113

114+
res.apmStatsQuery = ObjectSerializer.deserialize(
115+
data.apm_stats_query,
116+
"ApmStatsQueryDefinition",
117+
""
118+
);
119+
107120
res.eventQuery = ObjectSerializer.deserialize(
108121
data.event_query,
109122
"LogQueryDefinition",
@@ -170,6 +183,12 @@ export class DistributionWidgetRequest {
170183
""
171184
);
172185

186+
res.apm_stats_query = ObjectSerializer.serialize(
187+
data.apmStatsQuery,
188+
"ApmStatsQueryDefinition",
189+
""
190+
);
191+
173192
res.event_query = ObjectSerializer.serialize(
174193
data.eventQuery,
175194
"LogQueryDefinition",

0 commit comments

Comments
 (0)