Skip to content

Commit 6042c80

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ba41dfb of spec repo
1 parent dde009a commit 6042c80

18 files changed

Lines changed: 2265 additions & 19 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,6 +1828,38 @@ components:
18281828
x-enum-varnames:
18291829
- CUSTOM_TIMEBOARD
18301830
- CUSTOM_SCREENBOARD
1831+
DataProjectionQuery:
1832+
description: Query configuration for a data projection request.
1833+
properties:
1834+
data_source:
1835+
description: Data source for the query.
1836+
example: logs
1837+
type: string
1838+
indexes:
1839+
description: List of indexes to query.
1840+
items:
1841+
description: Index name.
1842+
type: string
1843+
type: array
1844+
query_string:
1845+
description: The query string to filter events.
1846+
example: "service:web-store"
1847+
type: string
1848+
storage:
1849+
description: Storage location for the query.
1850+
type: string
1851+
required:
1852+
- query_string
1853+
- data_source
1854+
type: object
1855+
DataProjectionRequestType:
1856+
description: Type of a data projection request.
1857+
enum:
1858+
- data_projection
1859+
example: data_projection
1860+
type: string
1861+
x-enum-varnames:
1862+
- DATA_PROJECTION
18311863
DeleteSharedDashboardResponse:
18321864
description: Response containing token of deleted shared dashboard.
18331865
properties:
@@ -11343,6 +11375,150 @@ components:
1134311375
maxItems: 2
1134411376
minItems: 2
1134511377
type: array
11378+
PointPlotDimension:
11379+
description: Dimension of the point plot.
11380+
enum:
11381+
- group
11382+
- time
11383+
- y
11384+
- radius
11385+
example: y
11386+
type: string
11387+
x-enum-varnames:
11388+
- GROUP
11389+
- TIME
11390+
- Y
11391+
- RADIUS
11392+
PointPlotProjection:
11393+
description: Projection configuration for the point plot widget.
11394+
properties:
11395+
dimensions:
11396+
description: List of dimension mappings for the projection.
11397+
items:
11398+
$ref: "#/components/schemas/PointPlotProjectionDimension"
11399+
type: array
11400+
extra_columns:
11401+
description: Additional columns to include in the projection.
11402+
items:
11403+
description: Column name.
11404+
type: string
11405+
type: array
11406+
type:
11407+
$ref: "#/components/schemas/PointPlotProjectionType"
11408+
required:
11409+
- type
11410+
- dimensions
11411+
type: object
11412+
PointPlotProjectionDimension:
11413+
description: Dimension mapping for the point plot projection.
11414+
properties:
11415+
alias:
11416+
description: Alias for the column.
11417+
type: string
11418+
column:
11419+
description: Source column name from the dataset.
11420+
example: duration
11421+
type: string
11422+
dimension:
11423+
$ref: "#/components/schemas/PointPlotDimension"
11424+
required:
11425+
- column
11426+
- dimension
11427+
type: object
11428+
PointPlotProjectionType:
11429+
description: Type of the projection.
11430+
enum:
11431+
- point_plot
11432+
example: point_plot
11433+
type: string
11434+
x-enum-varnames:
11435+
- POINT_PLOT
11436+
PointPlotWidgetDefinition:
11437+
description: The point plot displays individual data points over time.
11438+
properties:
11439+
custom_links:
11440+
description: List of custom links.
11441+
items:
11442+
$ref: "#/components/schemas/WidgetCustomLink"
11443+
type: array
11444+
description:
11445+
description: The description of the widget.
11446+
type: string
11447+
legend:
11448+
$ref: "#/components/schemas/PointPlotWidgetLegend"
11449+
markers:
11450+
description: List of markers for the widget.
11451+
items:
11452+
$ref: "#/components/schemas/WidgetMarker"
11453+
type: array
11454+
requests:
11455+
description: List of request configurations for the widget.
11456+
items:
11457+
$ref: "#/components/schemas/PointPlotWidgetRequest"
11458+
type: array
11459+
time:
11460+
$ref: "#/components/schemas/WidgetTime"
11461+
title:
11462+
description: Title of the widget.
11463+
type: string
11464+
title_align:
11465+
$ref: "#/components/schemas/WidgetTextAlign"
11466+
title_size:
11467+
description: Size of the title.
11468+
type: string
11469+
type:
11470+
$ref: "#/components/schemas/PointPlotWidgetDefinitionType"
11471+
yaxis:
11472+
$ref: "#/components/schemas/WidgetAxis"
11473+
required:
11474+
- type
11475+
- requests
11476+
type: object
11477+
PointPlotWidgetDefinitionType:
11478+
default: point_plot
11479+
description: Type of the point plot widget.
11480+
enum:
11481+
- point_plot
11482+
example: point_plot
11483+
type: string
11484+
x-enum-varnames:
11485+
- POINT_PLOT
11486+
PointPlotWidgetLegend:
11487+
description: Legend configuration for the point plot widget.
11488+
properties:
11489+
type:
11490+
$ref: "#/components/schemas/PointPlotWidgetLegendType"
11491+
required:
11492+
- type
11493+
type: object
11494+
PointPlotWidgetLegendType:
11495+
description: Type of legend to show for the point plot widget.
11496+
enum:
11497+
- automatic
11498+
- none
11499+
example: automatic
11500+
type: string
11501+
x-enum-varnames:
11502+
- AUTOMATIC
11503+
- NONE
11504+
PointPlotWidgetRequest:
11505+
description: Request configuration for the point plot widget.
11506+
properties:
11507+
limit:
11508+
description: Maximum number of data points to return.
11509+
format: int64
11510+
type: integer
11511+
projection:
11512+
$ref: "#/components/schemas/PointPlotProjection"
11513+
query:
11514+
$ref: "#/components/schemas/DataProjectionQuery"
11515+
request_type:
11516+
$ref: "#/components/schemas/DataProjectionRequestType"
11517+
required:
11518+
- request_type
11519+
- query
11520+
- projection
11521+
type: object
1134611522
PowerpackTemplateVariableContents:
1134711523
description: Powerpack template variable contents.
1134811524
properties:
@@ -25615,6 +25791,7 @@ components:
2561525791
- $ref: "#/components/schemas/MonitorSummaryWidgetDefinition"
2561625792
- $ref: "#/components/schemas/NoteWidgetDefinition"
2561725793
- $ref: "#/components/schemas/PowerpackWidgetDefinition"
25794+
- $ref: "#/components/schemas/PointPlotWidgetDefinition"
2561825795
- $ref: "#/components/schemas/QueryValueWidgetDefinition"
2561925796
- $ref: "#/components/schemas/RetentionCurveWidgetDefinition"
2562025797
- $ref: "#/components/schemas/RunWorkflowWidgetDefinition"
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Create a new dashboard with point_plot widget
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v1.api.DashboardsApi;
6+
import com.datadog.api.client.v1.model.Dashboard;
7+
import com.datadog.api.client.v1.model.DashboardLayoutType;
8+
import com.datadog.api.client.v1.model.DataProjectionQuery;
9+
import com.datadog.api.client.v1.model.DataProjectionRequestType;
10+
import com.datadog.api.client.v1.model.PointPlotDimension;
11+
import com.datadog.api.client.v1.model.PointPlotProjection;
12+
import com.datadog.api.client.v1.model.PointPlotProjectionDimension;
13+
import com.datadog.api.client.v1.model.PointPlotProjectionType;
14+
import com.datadog.api.client.v1.model.PointPlotWidgetDefinition;
15+
import com.datadog.api.client.v1.model.PointPlotWidgetDefinitionType;
16+
import com.datadog.api.client.v1.model.PointPlotWidgetRequest;
17+
import com.datadog.api.client.v1.model.Widget;
18+
import com.datadog.api.client.v1.model.WidgetDefinition;
19+
import com.datadog.api.client.v1.model.WidgetTextAlign;
20+
import java.util.Arrays;
21+
import java.util.Collections;
22+
23+
public class Example {
24+
public static void main(String[] args) {
25+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
26+
DashboardsApi apiInstance = new DashboardsApi(defaultClient);
27+
28+
Dashboard body =
29+
new Dashboard()
30+
.title("Example-Dashboard")
31+
.layoutType(DashboardLayoutType.ORDERED)
32+
.widgets(
33+
Collections.singletonList(
34+
new Widget()
35+
.definition(
36+
new WidgetDefinition(
37+
new PointPlotWidgetDefinition()
38+
.title("")
39+
.titleSize("16")
40+
.titleAlign(WidgetTextAlign.LEFT)
41+
.type(PointPlotWidgetDefinitionType.POINT_PLOT)
42+
.requests(
43+
Collections.singletonList(
44+
new PointPlotWidgetRequest()
45+
.requestType(
46+
DataProjectionRequestType.DATA_PROJECTION)
47+
.query(
48+
new DataProjectionQuery()
49+
.queryString("service:web-store")
50+
.dataSource("logs"))
51+
.projection(
52+
new PointPlotProjection()
53+
.type(PointPlotProjectionType.POINT_PLOT)
54+
.dimensions(
55+
Arrays.asList(
56+
new PointPlotProjectionDimension()
57+
.column("host")
58+
.dimension(
59+
PointPlotDimension.GROUP),
60+
new PointPlotProjectionDimension()
61+
.column("@duration")
62+
.dimension(
63+
PointPlotDimension
64+
.Y))))))))));
65+
66+
try {
67+
Dashboard result = apiInstance.createDashboard(body);
68+
System.out.println(result);
69+
} catch (ApiException e) {
70+
System.err.println("Exception when calling DashboardsApi#createDashboard");
71+
System.err.println("Status code: " + e.getCode());
72+
System.err.println("Reason: " + e.getResponseBody());
73+
System.err.println("Response headers: " + e.getResponseHeaders());
74+
e.printStackTrace();
75+
}
76+
}
77+
}

0 commit comments

Comments
 (0)