Skip to content

Commit 6707ca7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 442428b of spec repo
1 parent 0069c2d commit 6707ca7

File tree

6 files changed

+121
-0
lines changed

6 files changed

+121
-0
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,6 +2875,7 @@ components:
28752875
- ci_tests
28762876
- ci_pipelines
28772877
- incident_analytics
2878+
- product_analytics
28782879
example: logs
28792880
type: string
28802881
x-enum-varnames:
@@ -2889,6 +2890,7 @@ components:
28892890
- CI_TESTS
28902891
- CI_PIPELINES
28912892
- INCIDENT_ANALYTICS
2893+
- PRODUCT_ANALYTICS
28922894
FormulaAndFunctionMetricAggregation:
28932895
description: The aggregation methods available for metrics queries.
28942896
enum:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-09-18T18:51:17.951Z

cassettes/features/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Create a new timeseries widget with product_analytics data source
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
5+
6+
body = DatadogAPIClient::V1::Dashboard.new({
7+
title: "Example-Dashboard with product_analytics datasource",
8+
widgets: [
9+
DatadogAPIClient::V1::Widget.new({
10+
definition: DatadogAPIClient::V1::TimeseriesWidgetDefinition.new({
11+
title: "",
12+
show_legend: true,
13+
legend_layout: DatadogAPIClient::V1::TimeseriesWidgetLegendLayout::AUTO,
14+
legend_columns: [
15+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::AVG,
16+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::MIN,
17+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::MAX,
18+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::VALUE,
19+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::SUM,
20+
],
21+
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
22+
type: DatadogAPIClient::V1::TimeseriesWidgetDefinitionType::TIMESERIES,
23+
requests: [
24+
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
25+
formulas: [
26+
DatadogAPIClient::V1::WidgetFormula.new({
27+
formula: "query1",
28+
}),
29+
],
30+
queries: [
31+
DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition.new({
32+
data_source: DatadogAPIClient::V1::FormulaAndFunctionEventsDataSource::PRODUCT_ANALYTICS,
33+
name: "query1",
34+
search: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionSearch.new({
35+
query: "test_level:test",
36+
}),
37+
indexes: [
38+
"*",
39+
],
40+
compute: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionCompute.new({
41+
aggregation: DatadogAPIClient::V1::FormulaAndFunctionEventAggregation::COUNT,
42+
}),
43+
group_by: [],
44+
}),
45+
],
46+
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
47+
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
48+
palette: "dog_classic",
49+
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
50+
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
51+
}),
52+
display_type: DatadogAPIClient::V1::WidgetDisplayType::LINE,
53+
}),
54+
],
55+
}),
56+
}),
57+
],
58+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
59+
reflow_type: DatadogAPIClient::V1::DashboardReflowType::AUTO,
60+
})
61+
p api_instance.create_dashboard(body)

features/v1/dashboards.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,15 @@ Feature: Dashboards
950950
And the response "widgets[0].definition.time.value" is equal to 8
951951
And the response "widgets[0].definition.time.hide_incomplete_cost_data" is equal to true
952952

953+
@team:DataDog/dashboards-backend
954+
Scenario: Create a new timeseries widget with product_analytics data source
955+
Given new "CreateDashboard" request
956+
And body with value {"title":"{{ unique }} with product_analytics datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"product_analytics","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"}
957+
When the request is sent
958+
Then the response status is 200 OK
959+
And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "product_analytics"
960+
And the response "widgets[0].definition.requests[0].queries[0].search.query" is equal to "test_level:test"
961+
953962
@generated @skip @team:DataDog/reporting-and-sharing
954963
Scenario: Create a shared dashboard returns "Bad Request" response
955964
Given new "CreatePublicDashboard" request

lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ class FormulaAndFunctionEventsDataSource
3232
CI_TESTS = "ci_tests".freeze
3333
CI_PIPELINES = "ci_pipelines".freeze
3434
INCIDENT_ANALYTICS = "incident_analytics".freeze
35+
PRODUCT_ANALYTICS = "product_analytics".freeze
3536
end
3637
end

0 commit comments

Comments
 (0)