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
8 changes: 8 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6143,6 +6143,7 @@ components:
- security_runtime_stream
- security_signals_stream
- incidents_stream
- case_stream
example: logs_stream
type: string
x-enum-varnames:
Expand All @@ -6163,6 +6164,7 @@ components:
- SECURITY_RUNTIME_STREAM
- SECURITY_SIGNALS_STREAM
- INCIDENTS_STREAM
- CASE_STREAM
ListStreamWidgetDefinition:
description: |-
The list stream visualization displays a table of recent events in your application that
Expand Down Expand Up @@ -19849,6 +19851,9 @@ components:
items:
$ref: "#/components/schemas/SyntheticsTestRestrictionPolicyBinding"
type: array
bits_ai_auto_investigate:
description: Whether Bits AI automatically investigates alerts from the test monitor.
type: boolean
ci:
$ref: "#/components/schemas/SyntheticsTestCiOptions"
defaultStepTimeout:
Expand Down Expand Up @@ -20629,6 +20634,9 @@ components:
allow_insecure:
description: Allows loading insecure content for an HTTP request in an API test.
type: boolean
bits_ai_auto_investigate:
description: Whether Bits AI automatically investigates alerts from the test monitor.
type: boolean
blockedRequestPatterns:
description: Array of URL patterns to block.
items:
Expand Down
39 changes: 39 additions & 0 deletions examples/v1/dashboards/CreateDashboard_1996494326.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Create a new dashboard with case_stream list_stream widget

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

body = DatadogAPIClient::V1::Dashboard.new({
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
title: "Example-Dashboard with case_stream list_stream widget",
widgets: [
DatadogAPIClient::V1::Widget.new({
definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({
type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM,
requests: [
DatadogAPIClient::V1::ListStreamWidgetRequest.new({
columns: [
DatadogAPIClient::V1::ListStreamColumn.new({
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
field: "created_at",
}),
],
query: DatadogAPIClient::V1::ListStreamQuery.new({
data_source: DatadogAPIClient::V1::ListStreamSource::CASE_STREAM,
query_string: "*",
sort: DatadogAPIClient::V1::WidgetFieldSort.new({
column: "created_at",
order: DatadogAPIClient::V1::WidgetSort::DESCENDING,
}),
}),
response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST,
}),
],
}),
}),
],
})
p api_instance.create_dashboard(body)
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
accept_self_signed: false,
allow_insecure: true,
bits_ai_auto_investigate: true,
follow_redirects: true,
min_failure_duration: 10,
min_location_failed: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
accept_self_signed: false,
allow_insecure: true,
bits_ai_auto_investigate: true,
follow_redirects: true,
min_failure_duration: 10,
min_location_failed: 1,
Expand Down
11 changes: 11 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,17 @@ Feature: Dashboards
And the response "widgets[0].definition.requests[0].sort.order_by[0].type" is equal to "group"
And the response "widgets[0].definition.requests[0].sort.order_by[0].name" is equal to "service"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with case_stream list_stream widget
Given new "CreateDashboard" request
And body with value {"layout_type":"ordered","title":"{{ unique }} with case_stream list_stream widget","widgets":[{"definition":{"type":"list_stream","requests":[{"columns":[{"width":"auto","field":"created_at"}],"query":{"data_source":"case_stream","query_string":"*","sort":{"column":"created_at","order":"desc"}},"response_format":"event_list"}]}}]}
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "case_stream"
And the response "widgets[0].definition.requests[0].query.query_string" is equal to "*"
And the response "widgets[0].definition.requests[0].query.sort.column" is equal to "created_at"
And the response "widgets[0].definition.requests[0].query.sort.order" is equal to "desc"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with check_status widget
Given new "CreateDashboard" request
Expand Down
2 changes: 1 addition & 1 deletion features/v1/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
"parameters": [
{
"name": "body",
"value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n {\n \"operator\": \"lessThan\",\n \"target\": 2000,\n \"type\": \"responseTime\",\n \"timingsScope\": \"withoutDNS\"\n },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"elementsOperator\": \"atLeastOneElementMatches\",\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONSchema\",\n \"target\": {\n \"metaSchema\": \"draft-07\",\n \"jsonSchema\": \"{\\\"type\\\": \\\"object\\\", \\\"properties\\\":{\\\"slideshow\\\":{\\\"type\\\":\\\"object\\\"}}}\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"md5\",\n \"target\": \"a\",\n \"type\": \"bodyHash\"\n },\n {\n \"code\": \"const hello = 'world';\",\n \"type\": \"javascript\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"variablesFromScript\": \"dd.variable.set(\\\"FOO\\\", \\\"foo\\\")\",\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n },\n \"persistCookies\": true\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n"
"value": "{\n \"config\": {\n \"assertions\": [\n {\n \"operator\": \"is\",\n \"property\": \"{{ '{{ PROPERTY }}' }}\",\n \"target\": \"text/html\",\n \"type\": \"header\"\n },\n {\n \"operator\": \"lessThan\",\n \"target\": 2000,\n \"type\": \"responseTime\",\n \"timingsScope\": \"withoutDNS\"\n },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONPath\",\n \"target\": {\n \"elementsOperator\": \"atLeastOneElementMatches\",\n \"jsonPath\": \"topKey\",\n \"operator\": \"isNot\",\n \"targetValue\": \"0\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesJSONSchema\",\n \"target\": {\n \"metaSchema\": \"draft-07\",\n \"jsonSchema\": \"{\\\"type\\\": \\\"object\\\", \\\"properties\\\":{\\\"slideshow\\\":{\\\"type\\\":\\\"object\\\"}}}\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"validatesXPath\",\n \"target\": {\n \"xPath\": \"target-xpath\",\n \"targetValue\": \"0\",\n \"operator\": \"contains\"\n },\n \"type\": \"body\"\n },\n {\n \"operator\": \"md5\",\n \"target\": \"a\",\n \"type\": \"bodyHash\"\n },\n {\n \"code\": \"const hello = 'world';\",\n \"type\": \"javascript\"\n }\n ],\n \"configVariables\": [\n {\n \"example\": \"content-type\",\n \"name\": \"PROPERTY\",\n \"pattern\": \"content-type\",\n \"type\": \"text\"\n }\n ],\n \"variablesFromScript\": \"dd.variable.set(\\\"FOO\\\", \\\"foo\\\")\",\n \"request\": {\n \"certificate\": {\n \"cert\": {\n \"content\": \"cert-content\",\n \"filename\": \"cert-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n },\n \"key\": {\n \"content\": \"key-content\",\n \"filename\": \"key-filename\",\n \"updatedAt\": \"2020-10-16T09:23:24.857Z\"\n }\n },\n \"headers\": { \"unique\": \"{{ unique_lower_alnum }}\" },\n \"method\": \"GET\",\n \"timeout\": 10,\n \"url\": \"https://datadoghq.com\",\n \"proxy\": {\n \"url\": \"https://datadoghq.com\",\n \"headers\": {}\n },\n \"basicAuth\": {\n \"accessTokenUrl\": \"https://datadog-token.com\",\n \"audience\": \"audience\",\n \"clientId\": \"client-id\",\n \"clientSecret\": \"client-secret\",\n \"resource\": \"resource\",\n \"scope\": \"yoyo\",\n \"tokenApiAuthentication\": \"header\",\n \"type\": \"oauth-client\"\n },\n \"persistCookies\": true\n }\n },\n \"locations\": [\"aws:us-east-2\"],\n \"message\": \"BDD test payload: synthetics_api_http_test_payload.json\",\n \"name\": \"{{ unique }}\",\n \"options\": {\n \"accept_self_signed\": false,\n \"allow_insecure\": true,\n \"bits_ai_auto_investigate\": true,\n \"follow_redirects\": true,\n \"min_failure_duration\": 10,\n \"min_location_failed\": 1,\n \"monitor_name\": \"{{ unique }}\",\n \"monitor_priority\": 5,\n \"retry\": { \"count\": 3, \"interval\": 10 },\n \"tick_every\": 60,\n \"httpVersion\": \"http2\"\n },\n \"subtype\": \"http\",\n \"tags\": [\"testing:api\"],\n \"type\": \"api\"\n}\n"
}
],
"step": "there is a valid \"synthetics_api_test\" in the system",
Expand Down
1 change: 1 addition & 0 deletions features/v1/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Feature: Synthetics
And the response "name" is equal to "{{ unique }}"
And the response "config.assertions[7].type" is equal to "javascript"
And the response "config.assertions[7].code" is equal to "const hello = 'world';"
And the response "options.bits_ai_auto_investigate" is equal to true

@team:DataDog/synthetics-orchestrating-managing
Scenario: Create an API HTTP with oauth-rop test returns "OK - Returns the created test details." response
Expand Down
1 change: 1 addition & 0 deletions features/v1/synthetics_api_http_test_payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"options": {
"accept_self_signed": false,
"allow_insecure": true,
"bits_ai_auto_investigate": true,
"follow_redirects": true,
"min_failure_duration": 10,
"min_location_failed": 1,
Expand Down
7 changes: 7 additions & 0 deletions generated-test/test-runner-data/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@
"scenario": "Create a new dashboard with bar_chart widget sorted by group",
"version": "v1"
},
{
"feature": "Dashboards",
"feature_file": "../../features/v1/dashboards.feature",
"file": "v1/dashboards/create-a-new-dashboard-with-case-stream-list-stream-widget.json",
"scenario": "Create a new dashboard with case_stream list_stream widget",
"version": "v1"
},
{
"feature": "Dashboards",
"feature_file": "../../features/v1/dashboards.feature",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"api": "Dashboards",
"expected_status": 200,
"feature": "Dashboards",
"id": "v1/Dashboards/Create a new dashboard with case_stream list_stream widget",
"operation_id": "CreateDashboard",
"request": {
"body": {
"schema": {
"format": null,
"ref": "Dashboard",
"type": "object"
},
"source": "inline",
"value": {
"layout_type": "ordered",
"title": "{{ unique }} with case_stream list_stream widget",
"widgets": [
{
"definition": {
"requests": [
{
"columns": [
{
"field": "created_at",
"width": "auto"
}
],
"query": {
"data_source": "case_stream",
"query_string": "*",
"sort": {
"column": "created_at",
"order": "desc"
}
},
"response_format": "event_list"
}
],
"type": "list_stream"
}
}
]
}
},
"content_type": "application/json",
"method": "POST",
"pagination": false,
"parameters": [],
"path": "/api/v1/dashboard"
},
"scenario": "Create a new dashboard with case_stream list_stream widget",
"schema_version": 1,
"version": "v1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"options": {
"accept_self_signed": false,
"allow_insecure": true,
"bits_ai_auto_investigate": true,
"follow_redirects": true,
"httpVersion": "http2",
"min_failure_duration": 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"options": {
"accept_self_signed": false,
"allow_insecure": true,
"bits_ai_auto_investigate": true,
"follow_redirects": true,
"httpVersion": "http2",
"min_failure_duration": 10,
Expand Down
83 changes: 83 additions & 0 deletions generated-test/test-server-data/v1/dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -3185,6 +3185,89 @@
"scenario": "Create a new dashboard with bar_chart widget sorted by group",
"version": "v1"
},
{
"feature": "Dashboards",
"frozen_at": "2026-09-30T01:58:34.406Z",
"interactions": [
{
"request": {
"body": {
"type": "json",
"value": {
"layout_type": "ordered",
"title": "Test-Create_a_new_dashboard_with_case_stream_list_stream_widget-1790733514 with case_stream list_stream widget",
"widgets": [
{
"definition": {
"requests": [
{
"columns": [
{
"field": "created_at",
"width": "auto"
}
],
"query": {
"data_source": "case_stream",
"query_string": "*",
"sort": {
"column": "created_at",
"order": "desc"
}
},
"response_format": "event_list"
}
],
"type": "list_stream"
}
}
]
}
},
"content_type": "application/json",
"method": "POST",
"path": "/api/v1/dashboard",
"query": []
},
"response": {
"body": {
"encoding": "text",
"value": "{\"id\":\"kb4-hic-k5w\",\"title\":\"Test-Create_a_new_dashboard_with_case_stream_list_stream_widget-1790733514 with case_stream list_stream widget\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":\"frog\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/kb4-hic-k5w/test-createanewdashboardwithcasestreamliststreamwidget-1790733514-with-casestrea\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"created_at\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"case_stream\",\"query_string\":\"*\",\"sort\":{\"column\":\"created_at\",\"order\":\"desc\"}},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"},\"id\":2376957674388246}],\"notify_list\":null,\"created_at\":\"2026-09-30T01:58:34.620706+00:00\",\"modified_at\":\"2026-09-30T01:58:34.620706+00:00\",\"restricted_roles\":[]}"
},
"headers": {
"content-type": "application/json"
},
"reason": "OK",
"status": 200
}
},
{
"request": {
"body": {
"type": "empty",
"value": null
},
"content_type": "",
"method": "DELETE",
"path": "/api/v1/dashboard/kb4-hic-k5w",
"query": []
},
"response": {
"body": {
"encoding": "text",
"value": "{\"deleted_dashboard_id\":\"kb4-hic-k5w\"}"
},
"headers": {
"content-type": "application/json"
},
"reason": "OK",
"status": 200
}
}
],
"scenario": "Create a new dashboard with case_stream list_stream widget",
"version": "v1"
},
{
"feature": "Dashboards",
"frozen_at": "2024-11-15T19:32:37.699Z",
Expand Down
Loading
Loading