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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2026-04-30T15:58:43.378Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"log": {
"_recordingName": "Dashboards/Create a new dashboard with point_plot widget",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "059f3c5f6e7d9e3dad3a892d5629f2c1",
"_order": 0,
"cache": {},
"request": {
"bodySize": 437,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 559,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_point_plot_widget-1777564723\",\"widgets\":[{\"definition\":{\"requests\":[{\"projection\":{\"dimensions\":[{\"column\":\"host\",\"dimension\":\"group\"},{\"column\":\"@duration\",\"dimension\":\"y\"}],\"type\":\"point_plot\"},\"query\":{\"data_source\":\"logs\",\"query_string\":\"service:web-store\"},\"request_type\":\"data_projection\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"point_plot\"}}]}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard"
},
"response": {
"bodySize": 829,
"content": {
"mimeType": "application/json",
"size": 829,
"text": "{\"id\":\"w8g-9wi-uav\",\"title\":\"Test-Create_a_new_dashboard_with_point_plot_widget-1777564723\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/w8g-9wi-uav/test-createanewdashboardwithpointplotwidget-1777564723\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"projection\":{\"dimensions\":[{\"column\":\"host\",\"dimension\":\"group\"},{\"column\":\"@duration\",\"dimension\":\"y\"}],\"type\":\"point_plot\"},\"query\":{\"data_source\":\"logs\",\"query_string\":\"service:web-store\"},\"request_type\":\"data_projection\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"point_plot\"},\"id\":1386353259406476}],\"notify_list\":null,\"created_at\":\"2026-04-30T15:58:43.645158+00:00\",\"modified_at\":\"2026-04-30T15:58:43.645158+00:00\",\"restricted_roles\":[]}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 380,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2026-04-30T15:58:43.386Z",
"time": 481
},
{
"_id": "34713bd69597a294fdf5e297fb7f9187",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
}
],
"headersSize": 520,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard/w8g-9wi-uav"
},
"response": {
"bodySize": 38,
"content": {
"mimeType": "application/json",
"size": 38,
"text": "{\"deleted_dashboard_id\":\"w8g-9wi-uav\"}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 379,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2026-04-30T15:58:43.893Z",
"time": 1306
}
],
"pages": [],
"version": "1.2"
}
}
56 changes: 56 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2049446128.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Create a new dashboard with point_plot widget
*/

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.DashboardsApi(configuration);

const params: v1.DashboardsApiCreateDashboardRequest = {
body: {
title: "Example-Dashboard",
layoutType: "ordered",
widgets: [
{
definition: {
title: "",
titleSize: "16",
titleAlign: "left",
type: "point_plot",
requests: [
{
requestType: "data_projection",
query: {
queryString: "service:web-store",
dataSource: "logs",
},
projection: {
type: "point_plot",
dimensions: [
{
column: "host",
dimension: "group",
},
{
column: "@duration",
dimension: "y",
},
],
},
},
],
},
},
],
},
};

apiInstance
.createDashboard(params)
.then((data: v1.Dashboard) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
12 changes: 12 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,18 @@ Feature: Dashboards
And the response "widgets[0].definition.type" is equal to "note"
And the response "widgets[0].definition.content" is equal to "# Example Note"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with point_plot widget
Given new "CreateDashboard" request
And body from file "dashboards_json_payload/point_plot_widget.json"
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.type" is equal to "point_plot"
And the response "widgets[0].definition.requests[0].request_type" is equal to "data_projection"
And the response "widgets[0].definition.requests[0].projection.type" is equal to "point_plot"
And the response "widgets[0].definition.requests[0].projection.dimensions[0].dimension" is equal to "group"
And the response "widgets[0].definition.requests[0].projection.dimensions[1].dimension" is equal to "y"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with powerpack widget
Given new "CreateDashboard" request
Expand Down
Loading
Loading