Skip to content

Commit b6ac478

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add bar chart widget to Dashboards API (#3086)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 679ed60 commit b6ac478

27 files changed

Lines changed: 1457 additions & 0 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,174 @@ components:
895895
items:
896896
$ref: '#/components/schemas/AzureAccount'
897897
type: array
898+
BarChartWidgetDefinition:
899+
description: The bar chart visualization displays categorical data using vertical
900+
bars, allowing you to compare values across different groups.
901+
properties:
902+
custom_links:
903+
description: List of custom links.
904+
items:
905+
$ref: '#/components/schemas/WidgetCustomLink'
906+
type: array
907+
requests:
908+
description: List of bar chart widget requests.
909+
example:
910+
- q: system.load.1
911+
items:
912+
$ref: '#/components/schemas/BarChartWidgetRequest'
913+
maxItems: 1
914+
minItems: 1
915+
type: array
916+
style:
917+
$ref: '#/components/schemas/BarChartWidgetStyle'
918+
time:
919+
$ref: '#/components/schemas/WidgetTime'
920+
title:
921+
description: Title of your widget.
922+
type: string
923+
title_align:
924+
$ref: '#/components/schemas/WidgetTextAlign'
925+
title_size:
926+
description: Size of the title.
927+
type: string
928+
type:
929+
$ref: '#/components/schemas/BarChartWidgetDefinitionType'
930+
required:
931+
- type
932+
- requests
933+
type: object
934+
BarChartWidgetDefinitionType:
935+
default: bar_chart
936+
description: Type of the bar chart widget.
937+
enum:
938+
- bar_chart
939+
example: bar_chart
940+
type: string
941+
x-enum-varnames:
942+
- BAR_CHART
943+
BarChartWidgetDisplay:
944+
description: Bar chart widget display options.
945+
oneOf:
946+
- $ref: '#/components/schemas/BarChartWidgetStacked'
947+
- $ref: '#/components/schemas/BarChartWidgetFlat'
948+
BarChartWidgetFlat:
949+
description: Bar chart widget flat display.
950+
properties:
951+
type:
952+
$ref: '#/components/schemas/BarChartWidgetFlatType'
953+
required:
954+
- type
955+
type: object
956+
BarChartWidgetFlatType:
957+
default: flat
958+
description: Bar chart widget flat display type.
959+
enum:
960+
- flat
961+
example: flat
962+
type: string
963+
x-enum-varnames:
964+
- FLAT
965+
BarChartWidgetLegend:
966+
description: Bar chart widget stacked legend behavior.
967+
enum:
968+
- automatic
969+
- inline
970+
- none
971+
example: automatic
972+
type: string
973+
x-enum-varnames:
974+
- AUTOMATIC
975+
- INLINE
976+
- NONE
977+
BarChartWidgetRequest:
978+
description: Updated bar chart widget.
979+
properties:
980+
apm_query:
981+
$ref: '#/components/schemas/LogQueryDefinition'
982+
audit_query:
983+
$ref: '#/components/schemas/LogQueryDefinition'
984+
conditional_formats:
985+
description: List of conditional formats.
986+
example:
987+
- comparator: '>='
988+
palette: blue
989+
value: 1.0
990+
items:
991+
$ref: '#/components/schemas/WidgetConditionalFormat'
992+
type: array
993+
event_query:
994+
$ref: '#/components/schemas/LogQueryDefinition'
995+
formulas:
996+
description: List of formulas that operate on queries.
997+
items:
998+
$ref: '#/components/schemas/WidgetFormula'
999+
type: array
1000+
log_query:
1001+
$ref: '#/components/schemas/LogQueryDefinition'
1002+
network_query:
1003+
$ref: '#/components/schemas/LogQueryDefinition'
1004+
process_query:
1005+
$ref: '#/components/schemas/ProcessQueryDefinition'
1006+
profile_metrics_query:
1007+
$ref: '#/components/schemas/LogQueryDefinition'
1008+
q:
1009+
description: Widget query.
1010+
type: string
1011+
queries:
1012+
description: List of queries that can be returned directly or used in formulas.
1013+
items:
1014+
$ref: '#/components/schemas/FormulaAndFunctionQueryDefinition'
1015+
type: array
1016+
response_format:
1017+
$ref: '#/components/schemas/FormulaAndFunctionResponseFormat'
1018+
rum_query:
1019+
$ref: '#/components/schemas/LogQueryDefinition'
1020+
security_query:
1021+
$ref: '#/components/schemas/LogQueryDefinition'
1022+
sort:
1023+
$ref: '#/components/schemas/WidgetSortBy'
1024+
style:
1025+
$ref: '#/components/schemas/WidgetRequestStyle'
1026+
type: object
1027+
BarChartWidgetScaling:
1028+
description: Bar chart widget scaling definition.
1029+
enum:
1030+
- absolute
1031+
- relative
1032+
type: string
1033+
x-enum-varnames:
1034+
- ABSOLUTE
1035+
- RELATIVE
1036+
BarChartWidgetStacked:
1037+
description: Bar chart widget stacked display options.
1038+
properties:
1039+
legend:
1040+
$ref: '#/components/schemas/BarChartWidgetLegend'
1041+
type:
1042+
$ref: '#/components/schemas/BarChartWidgetStackedType'
1043+
required:
1044+
- type
1045+
type: object
1046+
BarChartWidgetStackedType:
1047+
default: stacked
1048+
description: Bar chart widget stacked display type.
1049+
enum:
1050+
- stacked
1051+
example: stacked
1052+
type: string
1053+
x-enum-varnames:
1054+
- STACKED
1055+
BarChartWidgetStyle:
1056+
description: Style customization for a bar chart widget.
1057+
properties:
1058+
display:
1059+
$ref: '#/components/schemas/BarChartWidgetDisplay'
1060+
palette:
1061+
description: Color palette to apply to the widget.
1062+
type: string
1063+
scaling:
1064+
$ref: '#/components/schemas/BarChartWidgetScaling'
1065+
type: object
8981066
CancelDowntimesByScopeRequest:
8991067
description: Cancel downtimes according to scope.
9001068
properties:
@@ -14520,6 +14688,7 @@ components:
1452014688
SplitGraphSourceWidgetDefinition:
1452114689
description: The original widget we are splitting on.
1452214690
oneOf:
14691+
- $ref: '#/components/schemas/BarChartWidgetDefinition'
1452314692
- $ref: '#/components/schemas/ChangeWidgetDefinition'
1452414693
- $ref: '#/components/schemas/GeomapWidgetDefinition'
1452514694
- $ref: '#/components/schemas/QueryValueWidgetDefinition'
@@ -25112,6 +25281,7 @@ components:
2511225281
oneOf:
2511325282
- $ref: '#/components/schemas/AlertGraphWidgetDefinition'
2511425283
- $ref: '#/components/schemas/AlertValueWidgetDefinition'
25284+
- $ref: '#/components/schemas/BarChartWidgetDefinition'
2511525285
- $ref: '#/components/schemas/ChangeWidgetDefinition'
2511625286
- $ref: '#/components/schemas/CheckStatusWidgetDefinition'
2511725287
- $ref: '#/components/schemas/DistributionWidgetDefinition'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-12-15T21:25:35.069Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Create a new dashboard with a bar_chart widget with stacked type and no legend specified",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "95489bd99bbf69f24e3f086db12e9591",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 709,
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_a_bar_chart_widget_with_stacked_type_and_no_legend_specified-1765833935\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"name\":\"service\",\"order\":\"asc\",\"type\":\"group\"}]}}],\"style\":{\"display\":{\"type\":\"stacked\"},\"palette\":\"dog_classic\",\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"bar_chart\"},\"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": 1064,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 1064,
45+
"text": "{\"id\":\"6yv-ayr-nyv\",\"title\":\"Test-Create_a_new_dashboard_with_a_bar_chart_widget_with_stacked_type_and_no_legend_specified-1765833935\",\"description\":\"\",\"author_handle\":\"jessica.sylvester@datadoghq.com\",\"author_name\":\"Jessica Sylvester\",\"layout_type\":\"free\",\"url\":\"/dashboard/6yv-ayr-nyv/test-createanewdashboardwithabarchartwidgetwithstackedtypeandnolegendspecified-1\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":10,\"order_by\":[{\"name\":\"service\",\"order\":\"asc\",\"type\":\"group\"}]}}],\"style\":{\"display\":{\"type\":\"stacked\"},\"palette\":\"dog_classic\",\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"bar_chart\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":747608743840054}],\"notify_list\":[],\"created_at\":\"2025-12-15T21:25:35.211465+00:00\",\"modified_at\":\"2025-12-15T21:25:35.211465+00:00\",\"restricted_roles\":[]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 381,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2025-12-15T21:25:35.076Z",
61+
"time": 202
62+
},
63+
{
64+
"_id": "15d53983ac641591b7110cf6a232a55f",
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/6yv-ayr-nyv"
82+
},
83+
"response": {
84+
"bodySize": 38,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 38,
88+
"text": "{\"deleted_dashboard_id\":\"6yv-ayr-nyv\"}"
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": "2025-12-15T21:25:35.284Z",
104+
"time": 435
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-12-15T21:26:29.455Z"

0 commit comments

Comments
 (0)