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
110 changes: 109 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13325,6 +13325,88 @@ components:
type: string
x-enum-varnames:
- SCATTERPLOT
ScatterplotDataProjectionDimension:
description: A single dimension mapping for a scatterplot data projection.
properties:
alias:
description: Display alias for the dimension.
type: string
column:
description: The column name from the data source.
example: duration
type: string
dimension:
$ref: "#/components/schemas/ScatterplotDimension"
number_format:
$ref: "#/components/schemas/WidgetNumberFormat"
required:
- column
- dimension
type: object
ScatterplotDataProjectionProjection:
description: The projection configuration for a scatterplot data projection request.
properties:
dimensions:
description: Dimension mappings for the scatterplot axes.
items:
$ref: "#/components/schemas/ScatterplotDataProjectionDimension"
type: array
type:
$ref: "#/components/schemas/ScatterplotDataProjectionProjectionType"
required:
- type
- dimensions
type: object
ScatterplotDataProjectionProjectionType:
description: The type of the scatterplot data projection.
enum:
- scatterplot
example: scatterplot
type: string
x-enum-varnames:
- SCATTERPLOT
ScatterplotDataProjectionQuery:
description: The query for a scatterplot data projection request.
properties:
data_source:
$ref: "#/components/schemas/FormulaAndFunctionEventsDataSource"
indexes:
description: Indexes to search.
items:
type: string
type: array
query_string:
description: The search query string.
example: "@service:web-store"
type: string
storage:
$ref: "#/components/schemas/ScatterplotDataProjectionQueryStorage"
required:
- query_string
- data_source
type: object
ScatterplotDataProjectionQueryStorage:
description: Storage tier to query.
enum:
- live
- hot
- habanero
- online_archives
- driveline
- flex_tier
- case_insensitive
- cloud_prem
example: hot
type: string
x-enum-varnames:
- LIVE
- HOT
- HABANERO
- ONLINE_ARCHIVES
- DRIVELINE
- FLEX_TIER
- CASE_INSENSITIVE
- CLOUD_PREM
ScatterplotDimension:
description: Dimension of the Scatterplot.
enum:
Expand All @@ -13340,21 +13422,47 @@ components:
- RADIUS
- COLOR
ScatterplotTableRequest:
description: Scatterplot request containing formulas and functions.
description: |-
Scatterplot table request. Supports two modes:
- **Formulas and functions** (default): `request_type` is absent or `"table"`. Uses `queries` and `formulas`.
- **Data projection**: `request_type` is `"data_projection"`. Uses `query`, `projection`, and optionally `limit`.
properties:
formulas:
description: List of Scatterplot formulas that operate on queries.
items:
$ref: "#/components/schemas/ScatterplotWidgetFormula"
type: array
limit:
description: Maximum number of rows to return. Used when `request_type` is `"data_projection"`.
format: int64
type: integer
projection:
$ref: "#/components/schemas/ScatterplotDataProjectionProjection"
description: Projection configuration for data projection mode. Used when `request_type` is `"data_projection"`.
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/ScatterplotDataProjectionQuery"
description: Query for data projection mode. Used when `request_type` is `"data_projection"`.
request_type:
$ref: "#/components/schemas/ScatterplotTableRequestType"
description: The type of the scatterplot table request. Use `"data_projection"` for unaggregated raw data.
response_format:
$ref: "#/components/schemas/FormulaAndFunctionResponseFormat"
type: object
ScatterplotTableRequestType:
description: The type of the scatterplot table request.
enum:
- table
- data_projection
example: data_projection
type: string
x-enum-varnames:
- TABLE
- DATA_PROJECTION
ScatterplotWidgetAggregator:
description: Aggregator used for the request.
enum:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2024-11-15T19:32:52.260Z"
"2026-04-14T13:48:27.274Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "4f2c4093d27f94a81f6d1d6ef8a6ee72",
"_id": "6fda3d1a041237fdea3b8020783755d7",
"_order": 0,
"cache": {},
"request": {
"bodySize": 861,
"bodySize": 1438,
"cookies": [],
"headers": [
{
Expand All @@ -32,17 +32,17 @@
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_scatterplot_widget-1731699172\",\"widgets\":[{\"definition\":{\"color_by_groups\":[],\"requests\":{\"table\":{\"formulas\":[{\"alias\":\"\",\"dimension\":\"x\",\"formula\":\"query1\"},{\"alias\":\"\",\"dimension\":\"y\",\"formula\":\"query2\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"},{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query2\",\"query\":\"avg:system.mem.used{*} by {service}\"}],\"response_format\":\"scalar\"}},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"scatterplot\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}"
"text": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_scatterplot_widget-1776174507\",\"widgets\":[{\"definition\":{\"color_by_groups\":[],\"requests\":{\"table\":{\"formulas\":[{\"alias\":\"\",\"dimension\":\"x\",\"formula\":\"query1\"},{\"alias\":\"\",\"dimension\":\"y\",\"formula\":\"query2\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"},{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query2\",\"query\":\"avg:system.mem.used{*} by {service}\"}],\"response_format\":\"scalar\"}},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"scatterplot\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}},{\"definition\":{\"requests\":{\"table\":{\"limit\":200,\"projection\":{\"dimensions\":[{\"column\":\"duration\",\"dimension\":\"x\"},{\"column\":\"@resource_name\",\"dimension\":\"y\"}],\"type\":\"scatterplot\"},\"query\":{\"data_source\":\"spans\",\"query_string\":\"@service:web-store\"},\"request_type\":\"data_projection\"}},\"title\":\"Data Projection Scatterplot\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"scatterplot\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":15,\"width\":47,\"x\":48,\"y\":0}}]}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard"
},
"response": {
"bodySize": 1187,
"bodySize": 1790,
"content": {
"mimeType": "application/json",
"size": 1187,
"text": "{\"id\":\"s39-kcu-kcv\",\"title\":\"Test-Create_a_new_dashboard_with_scatterplot_widget-1731699172\",\"description\":\"\",\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"free\",\"url\":\"/dashboard/s39-kcu-kcv/test-createanewdashboardwithscatterplotwidget-1731699172\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"color_by_groups\":[],\"requests\":{\"table\":{\"formulas\":[{\"alias\":\"\",\"dimension\":\"x\",\"formula\":\"query1\"},{\"alias\":\"\",\"dimension\":\"y\",\"formula\":\"query2\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"},{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query2\",\"query\":\"avg:system.mem.used{*} by {service}\"}],\"response_format\":\"scalar\"}},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"scatterplot\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":6421549335837738}],\"notify_list\":[],\"created_at\":\"2024-11-15T19:32:52.488297+00:00\",\"modified_at\":\"2024-11-15T19:32:52.488297+00:00\",\"restricted_roles\":[]}\n"
"size": 1790,
"text": "{\"id\":\"zdc-f9y-htv\",\"title\":\"Test-Create_a_new_dashboard_with_scatterplot_widget-1776174507\",\"description\":\"\",\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"free\",\"url\":\"/dashboard/zdc-f9y-htv/test-createanewdashboardwithscatterplotwidget-1776174507\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"color_by_groups\":[],\"requests\":{\"table\":{\"formulas\":[{\"alias\":\"\",\"dimension\":\"x\",\"formula\":\"query1\"},{\"alias\":\"\",\"dimension\":\"y\",\"formula\":\"query2\"}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"},{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query2\",\"query\":\"avg:system.mem.used{*} by {service}\"}],\"response_format\":\"scalar\"}},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"scatterplot\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":6156355834526034},{\"definition\":{\"requests\":{\"table\":{\"limit\":200,\"projection\":{\"dimensions\":[{\"column\":\"duration\",\"dimension\":\"x\"},{\"column\":\"@resource_name\",\"dimension\":\"y\"}],\"type\":\"scatterplot\"},\"query\":{\"data_source\":\"spans\",\"query_string\":\"@service:web-store\"},\"request_type\":\"data_projection\"}},\"title\":\"Data Projection Scatterplot\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"scatterplot\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":15,\"width\":47,\"x\":48,\"y\":0},\"id\":1138848396119898}],\"notify_list\":[],\"created_at\":\"2026-04-14T13:48:27.576450+00:00\",\"modified_at\":\"2026-04-14T13:48:27.576450+00:00\",\"restricted_roles\":[]}"
},
"cookies": [],
"headers": [
Expand All @@ -51,17 +51,17 @@
"value": "application/json"
}
],
"headersSize": 657,
"headersSize": 381,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-11-15T19:32:52.266Z",
"time": 301
"startedDateTime": "2026-04-14T13:48:27.286Z",
"time": 507
},
{
"_id": "843689b789cda05dc633af6a7ee8dc6d",
"_id": "44e3143b3781e0071bdceb41e07fca5e",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -74,18 +74,18 @@
"value": "application/json"
}
],
"headersSize": 520,
"headersSize": 518,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard/s39-kcu-kcv"
"url": "https://api.datadoghq.com/api/v1/dashboard/zdc-f9y-htv"
},
"response": {
"bodySize": 39,
"bodySize": 38,
"content": {
"mimeType": "application/json",
"size": 39,
"text": "{\"deleted_dashboard_id\":\"s39-kcu-kcv\"}\n"
"size": 38,
"text": "{\"deleted_dashboard_id\":\"zdc-f9y-htv\"}"
},
"cookies": [],
"headers": [
Expand All @@ -94,14 +94,14 @@
"value": "application/json"
}
],
"headersSize": 655,
"headersSize": 379,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-11-15T19:32:52.569Z",
"time": 159
"startedDateTime": "2026-04-14T13:48:27.817Z",
"time": 644
}
],
"pages": [],
Expand Down
7 changes: 7 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,13 @@ Feature: Dashboards
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.type" is equal to "scatterplot"
And the response "widgets[1].definition.type" is equal to "scatterplot"
And the response "widgets[1].definition.requests.table.request_type" is equal to "data_projection"
And the response "widgets[1].definition.requests.table.query.data_source" is equal to "spans"
And the response "widgets[1].definition.requests.table.query.query_string" is equal to "@service:web-store"
And the response "widgets[1].definition.requests.table.projection.type" is equal to "scatterplot"
And the response "widgets[1].definition.requests.table.projection.dimensions" has length 2
And the response "widgets[1].definition.requests.table.limit" is equal to 200

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with servicemap widget
Expand Down
49 changes: 49 additions & 0 deletions features/v1/dashboards_json_payload/scatterplot_widget.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,55 @@

]
}
},
{
"layout":{
"x":48,
"y":0,
"width":47,
"height":15
},
"definition":{
"title":"Data Projection Scatterplot",
"title_size":"16",
"title_align":"left",
"type":"scatterplot",
"requests":{
"table":{
"request_type":"data_projection",
"query":{
"query_string":"@service:web-store",
"data_source":"spans"
},
"projection":{
"type":"scatterplot",
"dimensions":[
{
"column":"duration",
"dimension":"x"
},
{
"column":"@resource_name",
"dimension":"y"
}
]
},
"limit":200
}
},
"xaxis":{
"scale":"linear",
"include_zero":true,
"min":"auto",
"max":"auto"
},
"yaxis":{
"scale":"linear",
"include_zero":true,
"min":"auto",
"max":"auto"
}
}
}
],
"template_variables":[
Expand Down
6 changes: 6 additions & 0 deletions services/dashboards/src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,15 @@ export { SankeyRumRequest } from "./models/SankeyRumRequest";
export { SankeyWidgetDefinition } from "./models/SankeyWidgetDefinition";
export { SankeyWidgetDefinitionType } from "./models/SankeyWidgetDefinitionType";
export { SankeyWidgetRequest } from "./models/SankeyWidgetRequest";
export { ScatterplotDataProjectionDimension } from "./models/ScatterplotDataProjectionDimension";
export { ScatterplotDataProjectionProjection } from "./models/ScatterplotDataProjectionProjection";
export { ScatterplotDataProjectionProjectionType } from "./models/ScatterplotDataProjectionProjectionType";
export { ScatterplotDataProjectionQuery } from "./models/ScatterplotDataProjectionQuery";
export { ScatterplotDataProjectionQueryStorage } from "./models/ScatterplotDataProjectionQueryStorage";
export { ScatterplotDimension } from "./models/ScatterplotDimension";
export { ScatterPlotRequest } from "./models/ScatterPlotRequest";
export { ScatterplotTableRequest } from "./models/ScatterplotTableRequest";
export { ScatterplotTableRequestType } from "./models/ScatterplotTableRequestType";
export { ScatterplotWidgetAggregator } from "./models/ScatterplotWidgetAggregator";
export { ScatterPlotWidgetDefinition } from "./models/ScatterPlotWidgetDefinition";
export { ScatterPlotWidgetDefinitionRequests } from "./models/ScatterPlotWidgetDefinitionRequests";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { ScatterplotTableRequest } from "./ScatterplotTableRequest";
*/
export class ScatterPlotWidgetDefinitionRequests {
/**
* Scatterplot request containing formulas and functions.
* Scatterplot table request. Supports two modes:
* - **Formulas and functions** (default): `request_type` is absent or `"table"`. Uses `queries` and `formulas`.
* - **Data projection**: `request_type` is `"data_projection"`. Uses `query`, `projection`, and optionally `limit`.
*/
"table"?: ScatterplotTableRequest;
/**
Expand Down
Loading
Loading