Skip to content
Merged
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
84 changes: 84 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ components:
description: ID of the alert to use in the widget.
example: ""
type: string
description:
description: The description of the widget.
type: string
time:
$ref: "#/components/schemas/WidgetTime"
title:
Expand Down Expand Up @@ -516,6 +519,9 @@ components:
description: ID of the alert to use in the widget.
example: ""
type: string
description:
description: The description of the widget.
type: string
precision:
description: Number of decimal to show. If not defined, will use the raw value.
format: int64
Expand Down Expand Up @@ -808,6 +814,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
requests:
description: List of bar chart widget requests.
example: ["q": "system.load.1"]
Expand Down Expand Up @@ -1015,6 +1024,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
requests:
description: |-
Array of one request object to display in the widget.
Expand Down Expand Up @@ -1177,6 +1189,9 @@ components:
description: Name of the check to use in the widget.
example: ""
type: string
description:
description: The description of the widget.
type: string
group:
description: Group reporting a single check.
type: string
Expand Down Expand Up @@ -1815,6 +1830,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
legend_size:
deprecated: true
description: (Deprecated) The widget legend was replaced by a tooltip and sidebar.
Expand Down Expand Up @@ -2501,6 +2519,9 @@ components:
The event stream is a widget version of the stream of events
on the Event Stream view. Only available on FREE layout dashboards.
properties:
description:
description: The description of the widget.
type: string
event_size:
$ref: "#/components/schemas/WidgetEventSize"
query:
Expand Down Expand Up @@ -2538,6 +2559,9 @@ components:
EventTimelineWidgetDefinition:
description: The event timeline is a widget version of the timeline that appears at the top of the Event Stream view. Only available on FREE layout dashboards.
properties:
description:
description: The description of the widget.
type: string
query:
description: Query to filter the event timeline with.
example: ""
Expand Down Expand Up @@ -3273,6 +3297,9 @@ components:
description: |-
The funnel visualization displays a funnel of user sessions that maps a sequence of view navigation and user interaction in your application.
properties:
description:
description: The description of the widget.
type: string
requests:
description: Request payload used to query items.
example: [{"query": {"data_source": "rum", "query_string": "@browser.name:Chrome", "steps": [{"facet": "@view.name", "value": "/logs"}, {"facet": "@view.name", "value": "/apm/home"}]}, "request_type": "funnel"}]
Expand Down Expand Up @@ -3468,6 +3495,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
requests:
description: |-
Array of request objects to display in the widget. May include an optional request for the region layer and/or an optional request for the points layer. Region layer requests must contain a `group-by` tag whose value is a country ISO code.
Expand Down Expand Up @@ -3734,6 +3764,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
events:
deprecated: true
description: List of widget events. Deprecated - Use `overlay` request type instead.
Expand Down Expand Up @@ -3999,6 +4032,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
group:
description: List of tag prefixes to group by.
items:
Expand Down Expand Up @@ -4978,6 +5014,9 @@ components:
The list stream visualization displays a table of recent events in your application that
match a search criteria using user-defined columns.
properties:
description:
description: The description of the widget.
type: string
legend_size:
$ref: "#/components/schemas/WidgetLegendSize"
requests:
Expand Down Expand Up @@ -5159,6 +5198,9 @@ components:
description: Column name.
type: string
type: array
description:
description: The description of the widget.
type: string
indexes:
description: An array of index names to query in the stream. Use [] to query all indexes at once.
example: ["days-3", "days-7"]
Expand Down Expand Up @@ -8572,6 +8614,9 @@ components:
description: The number of monitors to display.
format: int64
type: integer
description:
description: The description of the widget.
type: string
display_format:
$ref: "#/components/schemas/WidgetMonitorSummaryDisplayFormat"
hide_zero_counts:
Expand Down Expand Up @@ -10960,6 +11005,9 @@ components:
custom_unit:
description: Display a unit of your choice on the widget.
type: string
description:
description: The description of the widget.
type: string
precision:
description: Number of decimals to show. If not defined, the widget uses the raw value.
format: int64
Expand Down Expand Up @@ -11129,6 +11177,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
inputs:
description: Array of workflow inputs to map to dashboard template variables.
items:
Expand Down Expand Up @@ -12091,6 +12142,9 @@ components:
SLOListWidgetDefinition:
description: Use the SLO List widget to track your SLOs (Service Level Objectives) on dashboards.
properties:
description:
description: The description of the widget.
type: string
requests:
description: Array of one request object to display in the widget.
items:
Expand Down Expand Up @@ -12638,6 +12692,9 @@ components:
additional_query_filters:
description: Additional filters applied to the SLO query.
type: string
description:
description: The description of the widget.
type: string
global_time_target:
description: Defined global time target.
type: string
Expand Down Expand Up @@ -12737,6 +12794,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
requests:
$ref: "#/components/schemas/ScatterPlotWidgetDefinitionRequests"
time:
Expand Down Expand Up @@ -13555,6 +13615,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
filters:
description: Your environment and primary tag (or * if enabled for your account).
example: ["*"]
Expand Down Expand Up @@ -13594,6 +13657,9 @@ components:
ServiceSummaryWidgetDefinition:
description: The service summary displays the graphs of a chosen service in your screenboard. Only available on FREE layout dashboards.
properties:
description:
description: The description of the widget.
type: string
display_format:
$ref: "#/components/schemas/WidgetServiceSummaryDisplayFormat"
env:
Expand Down Expand Up @@ -14200,6 +14266,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
hide_total:
description: Show the total value in this widget.
type: boolean
Expand Down Expand Up @@ -18142,6 +18211,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
has_search_bar:
$ref: "#/components/schemas/TableWidgetHasSearchBar"
requests:
Expand Down Expand Up @@ -18487,6 +18559,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
events:
deprecated: true
description: List of widget events. Deprecated - Use `overlay` request type instead.
Expand Down Expand Up @@ -18661,6 +18736,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
requests:
description: List of top list widget requests.
example: ["q": "system.load.1"]
Expand Down Expand Up @@ -18842,6 +18920,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
requests:
description: One or more Topology requests.
items:
Expand Down Expand Up @@ -18957,6 +19038,9 @@ components:
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
group_by:
$ref: "#/components/schemas/TreeMapGroupBy"
requests:
Expand Down
1 change: 1 addition & 0 deletions examples/v1/dashboards/CreateDashboard_2349863258.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static void main(String[] args) {
.title("")
.titleSize("16")
.titleAlign(WidgetTextAlign.LEFT)
.description("Example widget description")
.time(new WidgetTime(new WidgetLegacyLiveSpan()))
.type(QueryValueWidgetDefinitionType.QUERY_VALUE)
.requests(
Expand Down
1 change: 1 addition & 0 deletions examples/v1/dashboards/CreateDashboard_3520534424.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static void main(String[] args) {
.title("")
.titleSize("16")
.titleAlign(WidgetTextAlign.LEFT)
.description("Example widget description")
.showLegend(true)
.legendLayout(TimeseriesWidgetLegendLayout.AUTO)
.time(new WidgetTime(new WidgetLegacyLiveSpan()))
Expand Down
78 changes: 78 additions & 0 deletions examples/v1/dashboards/CreateDashboard_3767278442.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Create a new dashboard with a query_value widget containing a description

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardsApi;
import com.datadog.api.client.v1.model.Dashboard;
import com.datadog.api.client.v1.model.DashboardLayoutType;
import com.datadog.api.client.v1.model.FormulaAndFunctionMetricAggregation;
import com.datadog.api.client.v1.model.FormulaAndFunctionMetricDataSource;
import com.datadog.api.client.v1.model.FormulaAndFunctionMetricQueryDefinition;
import com.datadog.api.client.v1.model.FormulaAndFunctionQueryDefinition;
import com.datadog.api.client.v1.model.FormulaAndFunctionResponseFormat;
import com.datadog.api.client.v1.model.QueryValueWidgetDefinition;
import com.datadog.api.client.v1.model.QueryValueWidgetDefinitionType;
import com.datadog.api.client.v1.model.QueryValueWidgetRequest;
import com.datadog.api.client.v1.model.Widget;
import com.datadog.api.client.v1.model.WidgetDefinition;
import com.datadog.api.client.v1.model.WidgetLayout;
import com.datadog.api.client.v1.model.WidgetLegacyLiveSpan;
import com.datadog.api.client.v1.model.WidgetTextAlign;
import com.datadog.api.client.v1.model.WidgetTime;
import java.util.Collections;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
DashboardsApi apiInstance = new DashboardsApi(defaultClient);

Dashboard body =
new Dashboard()
.title("Example-Dashboard")
.description("")
.widgets(
Collections.singletonList(
new Widget()
.layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L))
.definition(
new WidgetDefinition(
new QueryValueWidgetDefinition()
.title("")
.titleSize("16")
.titleAlign(WidgetTextAlign.LEFT)
.description("Example widget description")
.time(new WidgetTime(new WidgetLegacyLiveSpan()))
.type(QueryValueWidgetDefinitionType.QUERY_VALUE)
.requests(
Collections.singletonList(
new QueryValueWidgetRequest()
.responseFormat(
FormulaAndFunctionResponseFormat.SCALAR)
.queries(
Collections.singletonList(
new FormulaAndFunctionQueryDefinition(
new FormulaAndFunctionMetricQueryDefinition()
.name("query1")
.dataSource(
FormulaAndFunctionMetricDataSource
.METRICS)
.query("avg:system.cpu.user{*}")
.aggregator(
FormulaAndFunctionMetricAggregation
.AVG))))))
.autoscale(true)
.precision(2L)))))
.layoutType(DashboardLayoutType.FREE);

try {
Dashboard result = apiInstance.createDashboard(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardsApi#createDashboard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Loading
Loading