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
177 changes: 177 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,38 @@ components:
x-enum-varnames:
- CUSTOM_TIMEBOARD
- CUSTOM_SCREENBOARD
DataProjectionQuery:
description: Query configuration for a data projection request.
properties:
data_source:
description: Data source for the query.
example: logs
type: string
indexes:
description: List of indexes to query.
items:
description: Index name.
type: string
type: array
query_string:
description: The query string to filter events.
example: "service:web-store"
type: string
storage:
description: Storage location for the query.
type: string
required:
- query_string
- data_source
type: object
DataProjectionRequestType:
description: Type of a data projection request.
enum:
- data_projection
example: data_projection
type: string
x-enum-varnames:
- DATA_PROJECTION
DeleteSharedDashboardResponse:
description: Response containing token of deleted shared dashboard.
properties:
Expand Down Expand Up @@ -11338,6 +11370,150 @@ components:
maxItems: 2
minItems: 2
type: array
PointPlotDimension:
description: Dimension of the point plot.
enum:
- group
- time
- y
- radius
example: y
type: string
x-enum-varnames:
- GROUP
- TIME
- Y
- RADIUS
PointPlotProjection:
description: Projection configuration for the point plot widget.
properties:
dimensions:
description: List of dimension mappings for the projection.
items:
$ref: "#/components/schemas/PointPlotProjectionDimension"
type: array
extra_columns:
description: Additional columns to include in the projection.
items:
description: Column name.
type: string
type: array
type:
$ref: "#/components/schemas/PointPlotProjectionType"
required:
- type
- dimensions
type: object
PointPlotProjectionDimension:
description: Dimension mapping for the point plot projection.
properties:
alias:
description: Alias for the column.
type: string
column:
description: Source column name from the dataset.
example: duration
type: string
dimension:
$ref: "#/components/schemas/PointPlotDimension"
required:
- column
- dimension
type: object
PointPlotProjectionType:
description: Type of the projection.
enum:
- point_plot
example: point_plot
type: string
x-enum-varnames:
- POINT_PLOT
PointPlotWidgetDefinition:
description: The point plot displays individual data points over time.
properties:
custom_links:
description: List of custom links.
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
description:
description: The description of the widget.
type: string
legend:
$ref: "#/components/schemas/PointPlotWidgetLegend"
markers:
description: List of markers for the widget.
items:
$ref: "#/components/schemas/WidgetMarker"
type: array
requests:
description: List of request configurations for the widget.
items:
$ref: "#/components/schemas/PointPlotWidgetRequest"
type: array
time:
$ref: "#/components/schemas/WidgetTime"
title:
description: Title of the widget.
type: string
title_align:
$ref: "#/components/schemas/WidgetTextAlign"
title_size:
description: Size of the title.
type: string
type:
$ref: "#/components/schemas/PointPlotWidgetDefinitionType"
yaxis:
$ref: "#/components/schemas/WidgetAxis"
required:
- type
- requests
type: object
PointPlotWidgetDefinitionType:
default: point_plot
description: Type of the point plot widget.
enum:
- point_plot
example: point_plot
type: string
x-enum-varnames:
- POINT_PLOT
PointPlotWidgetLegend:
description: Legend configuration for the point plot widget.
properties:
type:
$ref: "#/components/schemas/PointPlotWidgetLegendType"
required:
- type
type: object
PointPlotWidgetLegendType:
description: Type of legend to show for the point plot widget.
enum:
- automatic
- none
example: automatic
type: string
x-enum-varnames:
- AUTOMATIC
- NONE
PointPlotWidgetRequest:
description: Request configuration for the point plot widget.
properties:
limit:
description: Maximum number of data points to return.
format: int64
type: integer
projection:
$ref: "#/components/schemas/PointPlotProjection"
query:
$ref: "#/components/schemas/DataProjectionQuery"
request_type:
$ref: "#/components/schemas/DataProjectionRequestType"
required:
- request_type
- query
- projection
type: object
PowerpackTemplateVariableContents:
description: Powerpack template variable contents.
properties:
Expand Down Expand Up @@ -25604,6 +25780,7 @@ components:
- $ref: "#/components/schemas/MonitorSummaryWidgetDefinition"
- $ref: "#/components/schemas/NoteWidgetDefinition"
- $ref: "#/components/schemas/PowerpackWidgetDefinition"
- $ref: "#/components/schemas/PointPlotWidgetDefinition"
- $ref: "#/components/schemas/QueryValueWidgetDefinition"
- $ref: "#/components/schemas/RetentionCurveWidgetDefinition"
- $ref: "#/components/schemas/RunWorkflowWidgetDefinition"
Expand Down
77 changes: 77 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2049446128.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Create a new dashboard with point_plot widget

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.DataProjectionQuery;
import com.datadog.api.client.v1.model.DataProjectionRequestType;
import com.datadog.api.client.v1.model.PointPlotDimension;
import com.datadog.api.client.v1.model.PointPlotProjection;
import com.datadog.api.client.v1.model.PointPlotProjectionDimension;
import com.datadog.api.client.v1.model.PointPlotProjectionType;
import com.datadog.api.client.v1.model.PointPlotWidgetDefinition;
import com.datadog.api.client.v1.model.PointPlotWidgetDefinitionType;
import com.datadog.api.client.v1.model.PointPlotWidgetRequest;
import com.datadog.api.client.v1.model.Widget;
import com.datadog.api.client.v1.model.WidgetDefinition;
import com.datadog.api.client.v1.model.WidgetTextAlign;
import java.util.Arrays;
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")
.layoutType(DashboardLayoutType.ORDERED)
.widgets(
Collections.singletonList(
new Widget()
.definition(
new WidgetDefinition(
new PointPlotWidgetDefinition()
.title("")
.titleSize("16")
.titleAlign(WidgetTextAlign.LEFT)
.type(PointPlotWidgetDefinitionType.POINT_PLOT)
.requests(
Collections.singletonList(
new PointPlotWidgetRequest()
.requestType(
DataProjectionRequestType.DATA_PROJECTION)
.query(
new DataProjectionQuery()
.queryString("service:web-store")
.dataSource("logs"))
.projection(
new PointPlotProjection()
.type(PointPlotProjectionType.POINT_PLOT)
.dimensions(
Arrays.asList(
new PointPlotProjectionDimension()
.column("host")
.dimension(
PointPlotDimension.GROUP),
new PointPlotProjectionDimension()
.column("@duration")
.dimension(
PointPlotDimension
.Y))))))))));

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