Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 84 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,9 @@ components:
type: string
markers:
description: List of markers.
example:
- display_type: percentile
value: '90'
items:
$ref: '#/components/schemas/WidgetMarker'
type: array
Expand Down Expand Up @@ -1816,6 +1819,11 @@ components:
$ref: '#/components/schemas/ApmStatsQueryDefinition'
event_query:
$ref: '#/components/schemas/LogQueryDefinition'
formulas:
description: List of formulas that operate on queries.
items:
$ref: '#/components/schemas/WidgetFormula'
type: array
log_query:
$ref: '#/components/schemas/LogQueryDefinition'
network_query:
Expand All @@ -1827,10 +1835,17 @@ components:
q:
description: Widget query.
type: string
queries:
description: List of queries that can be returned directly or used in formulas.
items:
$ref: '#/components/schemas/FormulaAndFunctionQueryDefinition'
type: array
query:
$ref: '#/components/schemas/DistributionWidgetHistogramRequestQuery'
request_type:
$ref: '#/components/schemas/DistributionWidgetHistogramRequestType'
response_format:
$ref: '#/components/schemas/FormulaAndFunctionResponseFormat'
rum_query:
$ref: '#/components/schemas/LogQueryDefinition'
security_query:
Expand All @@ -1854,6 +1869,12 @@ components:
description: Specifies minimum value to show on the x-axis. It takes a number,
percentile (p90 === 90th percentile), or auto for default behavior.
type: string
num_buckets:
description: Number of value buckets to target, aka the resolution of the
value bins.
example: 100
format: int64
type: integer
scale:
default: linear
description: Specifies the scale type. Possible values are `linear`.
Expand Down Expand Up @@ -3714,6 +3735,14 @@ components:
type: array
legend_size:
$ref: '#/components/schemas/WidgetLegendSize'
markers:
description: List of markers.
example:
- display_type: percentile
value: '90'
items:
$ref: '#/components/schemas/WidgetMarker'
type: array
requests:
description: List of widget types.
example:
Expand All @@ -3738,8 +3767,10 @@ components:
type: string
type:
$ref: '#/components/schemas/HeatMapWidgetDefinitionType'
xaxis:
$ref: '#/components/schemas/HeatMapWidgetXAxis'
yaxis:
$ref: '#/components/schemas/WidgetAxis'
$ref: '#/components/schemas/HeatMapWidgetYAxis'
required:
- type
- requests
Expand Down Expand Up @@ -3781,6 +3812,10 @@ components:
items:
$ref: '#/components/schemas/FormulaAndFunctionQueryDefinition'
type: array
query:
$ref: '#/components/schemas/DistributionWidgetHistogramRequestQuery'
request_type:
$ref: '#/components/schemas/DistributionWidgetHistogramRequestType'
response_format:
$ref: '#/components/schemas/FormulaAndFunctionResponseFormat'
rum_query:
Expand All @@ -3790,6 +3825,49 @@ components:
style:
$ref: '#/components/schemas/WidgetStyle'
type: object
HeatMapWidgetXAxis:
description: X Axis controls for the heat map widget.
properties:
num_buckets:
description: Number of time buckets to target, aka the resolution of the
time bins. This is only applicable for distribution of points (group distributions
use the roll-up modifier).
example: 50
format: int64
type: integer
type: object
HeatMapWidgetYAxis:
description: Y Axis controls for the heat map widget.
properties:
include_zero:
description: Set to `true` to include zero.
type: boolean
label:
description: The label of the axis to display on the graph. Only usable
on Scatterplot Widgets.
type: string
max:
default: auto
description: Specifies maximum numeric value to show on the axis. Defaults
to `auto`.
type: string
min:
default: auto
description: Specifies minimum numeric value to show on the axis. Defaults
to `auto`.
type: string
num_buckets:
description: Number of value buckets to target, aka the resolution of the
value bins.
example: 50
format: int64
type: integer
scale:
default: linear
description: Specifies the scale type. Possible values are `linear`, `log`,
`sqrt`, and `pow##` (for example `pow2` or `pow0.5`).
type: string
type: object
Host:
description: Object representing a host.
properties:
Expand Down Expand Up @@ -25147,7 +25225,7 @@ components:
display_type:
description: "Combination of:\n - A severity error, warning, ok, or info\n
\ - A line type: dashed, solid, or bold\nIn this case of a Distribution
widget, this can be set to be `x_axis_percentile`."
widget, this can be set to be `percentile`."
example: error dashed
type: string
label:
Expand All @@ -25158,8 +25236,11 @@ components:
description: Timestamp for the widget.
type: string
value:
description: Value to apply. Can be a single value y = 15 or a range of
description: 'Value to apply. Can be a single value y = 15 or a range of
values 0 < y < 10.

For Distribution widgets with `display_type` set to `percentile`, this
should be a numeric percentile value (e.g., "90" for P90).'
example: y = 15
type: string
required:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-12-04T23:08:04.708Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-12-08T13:44:04.899Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions examples/v1/dashboards/CreateDashboard_1093147852.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Create a new dashboard with distribution widget with markers and num_buckets

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

body = DatadogAPIClient::V1::Dashboard.new({
title: "Example-Dashboard",
widgets: [
DatadogAPIClient::V1::Widget.new({
definition: DatadogAPIClient::V1::DistributionWidgetDefinition.new({
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
type: DatadogAPIClient::V1::DistributionWidgetDefinitionType::DISTRIBUTION,
xaxis: DatadogAPIClient::V1::DistributionWidgetXAxis.new({
scale: "linear",
min: "auto",
max: "auto",
include_zero: true,
num_buckets: 55,
}),
yaxis: DatadogAPIClient::V1::DistributionWidgetYAxis.new({
scale: "linear",
min: "auto",
max: "auto",
include_zero: true,
}),
markers: [
DatadogAPIClient::V1::WidgetMarker.new({
display_type: "percentile",
value: "50",
}),
DatadogAPIClient::V1::WidgetMarker.new({
display_type: "percentile",
value: "99",
}),
DatadogAPIClient::V1::WidgetMarker.new({
display_type: "percentile",
value: "90",
}),
],
requests: [
DatadogAPIClient::V1::DistributionWidgetRequest.new({
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::SCALAR,
queries: [
DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({
data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS,
name: "query1",
query: "avg:system.cpu.user{*} by {service}",
aggregator: DatadogAPIClient::V1::FormulaAndFunctionMetricAggregation::AVG,
}),
],
}),
],
}),
layout: DatadogAPIClient::V1::WidgetLayout.new({
x: 0,
y: 0,
width: 4,
height: 4,
}),
}),
],
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
})
p api_instance.create_dashboard(body)
56 changes: 56 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2823363212.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Create a new dashboard with heatmap widget with markers and num_buckets

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

body = DatadogAPIClient::V1::Dashboard.new({
title: "Example-Dashboard",
widgets: [
DatadogAPIClient::V1::Widget.new({
definition: DatadogAPIClient::V1::HeatMapWidgetDefinition.new({
title: "",
title_size: "16",
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
type: DatadogAPIClient::V1::HeatMapWidgetDefinitionType::HEATMAP,
xaxis: DatadogAPIClient::V1::HeatMapWidgetXAxis.new({
num_buckets: 75,
}),
yaxis: DatadogAPIClient::V1::HeatMapWidgetYAxis.new({
scale: "linear",
min: "auto",
max: "auto",
include_zero: true,
num_buckets: 55,
}),
markers: [
DatadogAPIClient::V1::WidgetMarker.new({
display_type: "percentile",
value: "50",
}),
DatadogAPIClient::V1::WidgetMarker.new({
display_type: "percentile",
value: "99",
}),
],
requests: [
DatadogAPIClient::V1::HeatMapWidgetRequest.new({
request_type: DatadogAPIClient::V1::DistributionWidgetHistogramRequestType::HISTOGRAM,
query: DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({
data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS,
name: "query1",
query: "histogram:trace.servlet.request{*}",
}),
}),
],
}),
layout: DatadogAPIClient::V1::WidgetLayout.new({
x: 0,
y: 0,
width: 4,
height: 4,
}),
}),
],
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
})
p api_instance.create_dashboard(body)
Loading
Loading