Skip to content

Commit 96e7768

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 654b175a of spec repo
1 parent 9ca8ca2 commit 96e7768

File tree

8 files changed

+36
-22
lines changed

8 files changed

+36
-22
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.6.6",
7-
"regenerated": "2023-11-14 15:18:14.889333",
8-
"spec_repo_commit": "b95546fe"
7+
"regenerated": "2023-11-14 22:05:38.449545",
8+
"spec_repo_commit": "654b175a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-11-14 15:18:14.904239",
13-
"spec_repo_commit": "b95546fe"
12+
"regenerated": "2023-11-14 22:05:38.463746",
13+
"spec_repo_commit": "654b175a"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20886,6 +20886,8 @@ components:
2088620886
- 1mo
2088720887
- 3mo
2088820888
- 6mo
20889+
- week_to_date
20890+
- month_to_date
2088920891
- 1y
2089020892
- alert
2089120893
example: 5m
@@ -20904,6 +20906,8 @@ components:
2090420906
- PAST_ONE_MONTH
2090520907
- PAST_THREE_MONTHS
2090620908
- PAST_SIX_MONTHS
20909+
- WEEK_TO_DATE
20910+
- MONTH_TO_DATE
2090720911
- PAST_ONE_YEAR
2090820912
- ALERT
2090920913
WidgetMargin:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-07-11T14:32:45.409Z"
1+
"2023-11-14T21:39:19.397Z"

cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-q_3324864416/recording.har

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "21554e3cbbf51a3f13fd398b7622a007",
11+
"_id": "31bde127a70cba1222f823380e18b8b2",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 577,
15+
"bodySize": 613,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -26,23 +26,23 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 558,
29+
"headersSize": 559,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1689085965\",\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"}}]}"
35+
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1699997959\",\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"time\":{\"live_span\":\"week_to_date\"},\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"}}]}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v1/dashboard"
3939
},
4040
"response": {
41-
"bodySize": 988,
41+
"bodySize": 1052,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 988,
45-
"text": "{\"id\":\"kka-2iz-3jf\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1689085965\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/kka-2iz-3jf/test-createanewdashboardwithatimeserieswidgetusingformulasandfunctionscloudcostq\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"},\"id\":1004255439340}],\"notify_list\":null,\"created_at\":\"2023-07-11T14:32:45.564617+00:00\",\"modified_at\":\"2023-07-11T14:32:45.564617+00:00\",\"restricted_roles\":[]}\n"
44+
"size": 1052,
45+
"text": "{\"id\":\"nh3-n9c-wuz\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1699997959\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/nh3-n9c-wuz/test-createanewdashboardwithatimeserieswidgetusingformulasandfunctionscloudcostq\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"time\":{\"live_span\":\"week_to_date\"},\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"},\"id\":380165468656457}],\"notify_list\":null,\"created_at\":\"2023-11-14T21:39:19.798591+00:00\",\"modified_at\":\"2023-11-14T21:39:19.798591+00:00\",\"restricted_roles\":[]}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 517,
54+
"headersSize": 518,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-07-11T14:32:45.418Z",
61-
"time": 219
60+
"startedDateTime": "2023-11-14T21:39:19.414Z",
61+
"time": 494
6262
},
6363
{
64-
"_id": "7c80e62c382149b2a53afcb41ec2fea8",
64+
"_id": "f68f821829cb1e5d444043758daa2f6b",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -74,18 +74,18 @@
7474
"value": "application/json"
7575
}
7676
],
77-
"headersSize": 519,
77+
"headersSize": 518,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v1/dashboard/kka-2iz-3jf"
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/nh3-n9c-wuz"
8282
},
8383
"response": {
8484
"bodySize": 39,
8585
"content": {
8686
"mimeType": "application/json",
8787
"size": 39,
88-
"text": "{\"deleted_dashboard_id\":\"kka-2iz-3jf\"}\n"
88+
"text": "{\"deleted_dashboard_id\":\"nh3-n9c-wuz\"}\n"
8989
},
9090
"cookies": [],
9191
"headers": [
@@ -100,8 +100,8 @@
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2023-07-11T14:32:45.648Z",
104-
"time": 186
103+
"startedDateTime": "2023-11-14T21:39:19.923Z",
104+
"time": 428
105105
}
106106
],
107107
"pages": [],

examples/v1/dashboards/CreateDashboard_1284514532.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const params: v1.DashboardsApiCreateDashboardRequest = {
4141
displayType: "bars",
4242
},
4343
],
44+
time: {
45+
liveSpan: "week_to_date",
46+
},
4447
},
4548
},
4649
],

features/v1/dashboards.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,15 @@ Feature: Dashboards
177177
@team:DataDog/dashboards-backend
178178
Scenario: Create a new dashboard with a timeseries widget using formulas and functions cloud cost query
179179
Given new "CreateDashboard" request
180-
And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "Example Cloud Cost Query", "title_size": "16", "title_align": "left", "type": "timeseries", "requests": [ { "formulas": [ { "formula": "query1" } ], "queries": [ { "data_source": "cloud_cost", "name": "query1", "query": "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)" } ], "response_format": "timeseries", "style": { "palette": "dog_classic", "line_type": "solid", "line_width": "normal" }, "display_type": "bars" } ] } } ], "layout_type": "ordered" }
180+
And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "Example Cloud Cost Query", "title_size": "16", "title_align": "left", "type": "timeseries", "requests": [ { "formulas": [ { "formula": "query1" } ], "queries": [ { "data_source": "cloud_cost", "name": "query1", "query": "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)" } ], "response_format": "timeseries", "style": { "palette": "dog_classic", "line_type": "solid", "line_width": "normal" }, "display_type": "bars" } ], "time": { "live_span": "week_to_date" } } } ], "layout_type": "ordered" }
181181
When the request is sent
182182
Then the response status is 200 OK
183183
And the response "widgets[0].definition.requests[0].response_format" is equal to "timeseries"
184184
And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "cloud_cost"
185185
And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1"
186186
And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)"
187187
And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1"
188+
And the response "widgets[0].definition.time.live_span" is equal to "week_to_date"
188189

189190
@team:DataDog/dashboards-backend
190191
Scenario: Create a new dashboard with alert_graph widget

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,8 @@ const enumsMap: { [key: string]: any[] } = {
14901490
"1mo",
14911491
"3mo",
14921492
"6mo",
1493+
"week_to_date",
1494+
"month_to_date",
14931495
"1y",
14941496
"alert",
14951497
],

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export type WidgetLiveSpan =
2424
| typeof PAST_ONE_MONTH
2525
| typeof PAST_THREE_MONTHS
2626
| typeof PAST_SIX_MONTHS
27+
| typeof WEEK_TO_DATE
28+
| typeof MONTH_TO_DATE
2729
| typeof PAST_ONE_YEAR
2830
| typeof ALERT
2931
| UnparsedObject;
@@ -40,5 +42,7 @@ export const PAST_ONE_WEEK = "1w";
4042
export const PAST_ONE_MONTH = "1mo";
4143
export const PAST_THREE_MONTHS = "3mo";
4244
export const PAST_SIX_MONTHS = "6mo";
45+
export const WEEK_TO_DATE = "week_to_date";
46+
export const MONTH_TO_DATE = "month_to_date";
4347
export const PAST_ONE_YEAR = "1y";
4448
export const ALERT = "alert";

0 commit comments

Comments
 (0)