diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index bf2effce6..48f45d0bc 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2962,10 +2962,7 @@ components: data_source: $ref: '#/components/schemas/FormulaAndFunctionEventsDataSource' group_by: - description: Group by options. - items: - $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBy' - type: array + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByConfig' indexes: description: An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. @@ -3037,6 +3034,40 @@ components: required: - facet type: object + FormulaAndFunctionEventQueryGroupByConfig: + description: Group by configuration for a formula and functions events query. + Accepts either a list of facet objects or a flat object that specifies a list + of facet fields. + oneOf: + - $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByList' + - $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupByFields' + FormulaAndFunctionEventQueryGroupByFields: + description: Flat group by configuration using multiple event facet fields. + properties: + fields: + description: List of event facets to group by. + example: + - hostname + - service + items: + description: Event facet. + type: string + type: array + limit: + description: Number of groups to return. + example: 10 + format: int64 + type: integer + sort: + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBySort' + required: + - fields + type: object + FormulaAndFunctionEventQueryGroupByList: + description: List of objects used to group by. + items: + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBy' + type: array FormulaAndFunctionEventQueryGroupBySort: description: Options for sorting group by results. properties: diff --git a/examples/v1_dashboards_CreateDashboard_1024858348.rs b/examples/v1_dashboards_CreateDashboard_1024858348.rs index 9c824ad85..457d7414c 100644 --- a/examples/v1_dashboards_CreateDashboard_1024858348.rs +++ b/examples/v1_dashboards_CreateDashboard_1024858348.rs @@ -49,7 +49,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::LOGS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_1307120899.rs b/examples/v1_dashboards_CreateDashboard_1307120899.rs index 2721b558b..d79ea0c1f 100644 --- a/examples/v1_dashboards_CreateDashboard_1307120899.rs +++ b/examples/v1_dashboards_CreateDashboard_1307120899.rs @@ -53,7 +53,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::CI_TESTS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_1617893815.rs b/examples/v1_dashboards_CreateDashboard_1617893815.rs index cb0cda329..58a18e8f0 100644 --- a/examples/v1_dashboards_CreateDashboard_1617893815.rs +++ b/examples/v1_dashboards_CreateDashboard_1617893815.rs @@ -11,6 +11,7 @@ use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinition use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionCompute; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupBy; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupByConfig; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupBySort; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventsDataSource; use datadog_api_client::datadogV1::model::FormulaAndFunctionQueryDefinition; @@ -49,19 +50,22 @@ async fn main() { "query1".to_string(), ) .group_by( - vec![ - FormulaAndFunctionEventQueryGroupBy::new( - "service".to_string(), - ) - .limit(1000) - .sort( - FormulaAndFunctionEventQueryGroupBySort - ::new( - FormulaAndFunctionEventAggregation - ::COUNT, - ).order(QuerySortOrder::DESC), + FormulaAndFunctionEventQueryGroupByConfig + ::FormulaAndFunctionEventQueryGroupByList( + vec![ + FormulaAndFunctionEventQueryGroupBy::new( + "service".to_string(), ) - ], + .limit(1000) + .sort( + FormulaAndFunctionEventQueryGroupBySort + ::new( + FormulaAndFunctionEventAggregation + ::COUNT, + ).order(QuerySortOrder::DESC), + ) + ], + ), ) .indexes(vec!["*".to_string()]) .search( diff --git a/examples/v1_dashboards_CreateDashboard_2064651578.rs b/examples/v1_dashboards_CreateDashboard_2064651578.rs index de670290e..d34bce241 100644 --- a/examples/v1_dashboards_CreateDashboard_2064651578.rs +++ b/examples/v1_dashboards_CreateDashboard_2064651578.rs @@ -61,7 +61,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::LOGS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_2490110261.rs b/examples/v1_dashboards_CreateDashboard_2490110261.rs index 024983863..2542e4a8a 100644 --- a/examples/v1_dashboards_CreateDashboard_2490110261.rs +++ b/examples/v1_dashboards_CreateDashboard_2490110261.rs @@ -42,7 +42,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::AUDIT, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_2800096921.rs b/examples/v1_dashboards_CreateDashboard_2800096921.rs index 046fa4e3e..cb201df6a 100644 --- a/examples/v1_dashboards_CreateDashboard_2800096921.rs +++ b/examples/v1_dashboards_CreateDashboard_2800096921.rs @@ -53,7 +53,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_3066042014.rs b/examples/v1_dashboards_CreateDashboard_3066042014.rs index f11594b6e..ad2583ad6 100644 --- a/examples/v1_dashboards_CreateDashboard_3066042014.rs +++ b/examples/v1_dashboards_CreateDashboard_3066042014.rs @@ -55,7 +55,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_3451918078.rs b/examples/v1_dashboards_CreateDashboard_3451918078.rs index 85b84c4f0..0f0c20724 100644 --- a/examples/v1_dashboards_CreateDashboard_3451918078.rs +++ b/examples/v1_dashboards_CreateDashboard_3451918078.rs @@ -54,7 +54,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_3669695268.rs b/examples/v1_dashboards_CreateDashboard_3669695268.rs index 70e37ba84..34acec579 100644 --- a/examples/v1_dashboards_CreateDashboard_3669695268.rs +++ b/examples/v1_dashboards_CreateDashboard_3669695268.rs @@ -44,7 +44,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::LOGS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search(FormulaAndFunctionEventQueryDefinitionSearch::new( "".to_string(), diff --git a/examples/v1_dashboards_CreateDashboard_3882428227.rs b/examples/v1_dashboards_CreateDashboard_3882428227.rs index d68ab20ad..943e1a0da 100644 --- a/examples/v1_dashboards_CreateDashboard_3882428227.rs +++ b/examples/v1_dashboards_CreateDashboard_3882428227.rs @@ -45,7 +45,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::EVENTS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_4018282928.rs b/examples/v1_dashboards_CreateDashboard_4018282928.rs new file mode 100644 index 000000000..701fa92f0 --- /dev/null +++ b/examples/v1_dashboards_CreateDashboard_4018282928.rs @@ -0,0 +1,87 @@ +// Create a new dashboard with formulas and functions events query using flat +// group by fields +use datadog_api_client::datadog; +use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; +use datadog_api_client::datadogV1::model::Dashboard; +use datadog_api_client::datadogV1::model::DashboardLayoutType; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventAggregation; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinition; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionCompute; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupByConfig; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupByFields; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventsDataSource; +use datadog_api_client::datadogV1::model::FormulaAndFunctionQueryDefinition; +use datadog_api_client::datadogV1::model::FormulaAndFunctionResponseFormat; +use datadog_api_client::datadogV1::model::TimeseriesWidgetDefinition; +use datadog_api_client::datadogV1::model::TimeseriesWidgetDefinitionType; +use datadog_api_client::datadogV1::model::TimeseriesWidgetRequest; +use datadog_api_client::datadogV1::model::Widget; +use datadog_api_client::datadogV1::model::WidgetDefinition; +use datadog_api_client::datadogV1::model::WidgetLayout; + +#[tokio::main] +async fn main() { + let body = + Dashboard::new( + DashboardLayoutType::ORDERED, + "Example-Dashboard with events flat group_by fields".to_string(), + vec![ + Widget::new( + WidgetDefinition::TimeseriesWidgetDefinition( + Box::new( + TimeseriesWidgetDefinition::new( + vec![ + TimeseriesWidgetRequest::new() + .queries( + vec![ + FormulaAndFunctionQueryDefinition + ::FormulaAndFunctionEventQueryDefinition( + Box::new( + FormulaAndFunctionEventQueryDefinition::new( + FormulaAndFunctionEventQueryDefinitionCompute::new( + FormulaAndFunctionEventAggregation::COUNT, + ), + FormulaAndFunctionEventsDataSource::EVENTS, + "query1".to_string(), + ) + .group_by( + FormulaAndFunctionEventQueryGroupByConfig + ::FormulaAndFunctionEventQueryGroupByFields( + Box::new( + FormulaAndFunctionEventQueryGroupByFields::new( + vec![ + "service".to_string(), + "host".to_string() + ], + ).limit(10), + ), + ), + ) + .search( + FormulaAndFunctionEventQueryDefinitionSearch::new( + "".to_string(), + ), + ), + ), + ) + ], + ) + .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) + ], + TimeseriesWidgetDefinitionType::TIMESERIES, + ), + ), + ), + ).layout(WidgetLayout::new(2, 4, 0, 0)) + ], + ); + let configuration = datadog::Configuration::new(); + let api = DashboardsAPI::with_config(configuration); + let resp = api.create_dashboard(body).await; + if let Ok(value) = resp { + println!("{:#?}", value); + } else { + println!("{:#?}", resp.unwrap_err()); + } +} diff --git a/examples/v1_dashboards_CreateDashboard_4262729673.rs b/examples/v1_dashboards_CreateDashboard_4262729673.rs index bf0545cda..51afac727 100644 --- a/examples/v1_dashboards_CreateDashboard_4262729673.rs +++ b/examples/v1_dashboards_CreateDashboard_4262729673.rs @@ -54,7 +54,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::CI_PIPELINES, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_578885732.rs b/examples/v1_dashboards_CreateDashboard_578885732.rs index 1ca04e73b..82a1c4727 100644 --- a/examples/v1_dashboards_CreateDashboard_578885732.rs +++ b/examples/v1_dashboards_CreateDashboard_578885732.rs @@ -61,7 +61,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::LOGS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_607525069.rs b/examples/v1_dashboards_CreateDashboard_607525069.rs index 35321b30f..8be77a6fb 100644 --- a/examples/v1_dashboards_CreateDashboard_607525069.rs +++ b/examples/v1_dashboards_CreateDashboard_607525069.rs @@ -53,7 +53,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::PRODUCT_ANALYTICS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_732700533.rs b/examples/v1_dashboards_CreateDashboard_732700533.rs new file mode 100644 index 000000000..603c3f68b --- /dev/null +++ b/examples/v1_dashboards_CreateDashboard_732700533.rs @@ -0,0 +1,84 @@ +// Create a new dashboard with formulas and functions events query using facet +// group by +use datadog_api_client::datadog; +use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI; +use datadog_api_client::datadogV1::model::Dashboard; +use datadog_api_client::datadogV1::model::DashboardLayoutType; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventAggregation; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinition; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionCompute; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupBy; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupByConfig; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventsDataSource; +use datadog_api_client::datadogV1::model::FormulaAndFunctionQueryDefinition; +use datadog_api_client::datadogV1::model::FormulaAndFunctionResponseFormat; +use datadog_api_client::datadogV1::model::TimeseriesWidgetDefinition; +use datadog_api_client::datadogV1::model::TimeseriesWidgetDefinitionType; +use datadog_api_client::datadogV1::model::TimeseriesWidgetRequest; +use datadog_api_client::datadogV1::model::Widget; +use datadog_api_client::datadogV1::model::WidgetDefinition; +use datadog_api_client::datadogV1::model::WidgetLayout; + +#[tokio::main] +async fn main() { + let body = + Dashboard::new( + DashboardLayoutType::ORDERED, + "Example-Dashboard with events facet group_by".to_string(), + vec![ + Widget::new( + WidgetDefinition::TimeseriesWidgetDefinition( + Box::new( + TimeseriesWidgetDefinition::new( + vec![ + TimeseriesWidgetRequest::new() + .queries( + vec![ + FormulaAndFunctionQueryDefinition + ::FormulaAndFunctionEventQueryDefinition( + Box::new( + FormulaAndFunctionEventQueryDefinition::new( + FormulaAndFunctionEventQueryDefinitionCompute::new( + FormulaAndFunctionEventAggregation::COUNT, + ), + FormulaAndFunctionEventsDataSource::EVENTS, + "query1".to_string(), + ) + .group_by( + FormulaAndFunctionEventQueryGroupByConfig + ::FormulaAndFunctionEventQueryGroupByList( + vec![ + FormulaAndFunctionEventQueryGroupBy::new( + "service".to_string(), + ).limit(10) + ], + ), + ) + .search( + FormulaAndFunctionEventQueryDefinitionSearch::new( + "".to_string(), + ), + ), + ), + ) + ], + ) + .response_format(FormulaAndFunctionResponseFormat::TIMESERIES) + ], + TimeseriesWidgetDefinitionType::TIMESERIES, + ), + ), + ), + ).layout(WidgetLayout::new(2, 4, 0, 0)) + ], + ); + let configuration = datadog::Configuration::new(); + let api = DashboardsAPI::with_config(configuration); + let resp = api.create_dashboard(body).await; + if let Ok(value) = resp { + println!("{:#?}", value); + } else { + println!("{:#?}", resp.unwrap_err()); + } +} diff --git a/examples/v1_dashboards_CreateDashboard_915214113.rs b/examples/v1_dashboards_CreateDashboard_915214113.rs index ad32a36da..d8e69b2e4 100644 --- a/examples/v1_dashboards_CreateDashboard_915214113.rs +++ b/examples/v1_dashboards_CreateDashboard_915214113.rs @@ -8,6 +8,7 @@ use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinition use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionCompute; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryDefinitionSearch; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupBy; +use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupByConfig; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventQueryGroupBySort; use datadog_api_client::datadogV1::model::FormulaAndFunctionEventsDataSource; use datadog_api_client::datadogV1::model::FormulaAndFunctionQueryDefinition; @@ -58,19 +59,22 @@ async fn main() { "query1".to_string(), ) .group_by( - vec![ - FormulaAndFunctionEventQueryGroupBy::new( - "@geo.country_iso_code".to_string(), - ) - .limit(250) - .sort( - FormulaAndFunctionEventQueryGroupBySort - ::new( - FormulaAndFunctionEventAggregation - ::COUNT, - ).order(QuerySortOrder::DESC), + FormulaAndFunctionEventQueryGroupByConfig + ::FormulaAndFunctionEventQueryGroupByList( + vec![ + FormulaAndFunctionEventQueryGroupBy::new( + "@geo.country_iso_code".to_string(), ) - ], + .limit(250) + .sort( + FormulaAndFunctionEventQueryGroupBySort + ::new( + FormulaAndFunctionEventAggregation + ::COUNT, + ).order(QuerySortOrder::DESC), + ) + ], + ), ) .indexes(vec!["*".to_string()]) .search( diff --git a/examples/v1_dashboards_CreateDashboard_9836563.rs b/examples/v1_dashboards_CreateDashboard_9836563.rs index 1d3168d21..94df4983f 100644 --- a/examples/v1_dashboards_CreateDashboard_9836563.rs +++ b/examples/v1_dashboards_CreateDashboard_9836563.rs @@ -73,7 +73,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::RUM, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/examples/v1_dashboards_CreateDashboard_985012506.rs b/examples/v1_dashboards_CreateDashboard_985012506.rs index a24fb2c0c..7c4d397b6 100644 --- a/examples/v1_dashboards_CreateDashboard_985012506.rs +++ b/examples/v1_dashboards_CreateDashboard_985012506.rs @@ -53,7 +53,6 @@ async fn main() { FormulaAndFunctionEventsDataSource::INCIDENT_ANALYTICS, "query1".to_string(), ) - .group_by(vec![]) .indexes(vec!["*".to_string()]) .search( FormulaAndFunctionEventQueryDefinitionSearch::new( diff --git a/src/datadogV1/model/mod.rs b/src/datadogV1/model/mod.rs index 311929679..db1d08973 100644 --- a/src/datadogV1/model/mod.rs +++ b/src/datadogV1/model/mod.rs @@ -202,6 +202,10 @@ pub mod model_formula_and_function_event_query_group_by; pub use self::model_formula_and_function_event_query_group_by::FormulaAndFunctionEventQueryGroupBy; pub mod model_formula_and_function_event_query_group_by_sort; pub use self::model_formula_and_function_event_query_group_by_sort::FormulaAndFunctionEventQueryGroupBySort; +pub mod model_formula_and_function_event_query_group_by_fields; +pub use self::model_formula_and_function_event_query_group_by_fields::FormulaAndFunctionEventQueryGroupByFields; +pub mod model_formula_and_function_event_query_group_by_config; +pub use self::model_formula_and_function_event_query_group_by_config::FormulaAndFunctionEventQueryGroupByConfig; pub mod model_formula_and_function_event_query_definition_search; pub use self::model_formula_and_function_event_query_definition_search::FormulaAndFunctionEventQueryDefinitionSearch; pub mod model_formula_and_function_process_query_definition; diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs index 32839ce73..405b52526 100644 --- a/src/datadogV1/model/model_formula_and_function_event_query_definition.rs +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs @@ -20,9 +20,9 @@ pub struct FormulaAndFunctionEventQueryDefinition { /// Data source for event platform-based queries. #[serde(rename = "data_source")] pub data_source: crate::datadogV1::model::FormulaAndFunctionEventsDataSource, - /// Group by options. + /// Group by configuration for a formula and functions events query. Accepts either a list of facet objects or a flat object that specifies a list of facet fields. #[serde(rename = "group_by")] - pub group_by: Option>, + pub group_by: Option, /// An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. #[serde(rename = "indexes")] pub indexes: Option>, @@ -69,7 +69,7 @@ impl FormulaAndFunctionEventQueryDefinition { pub fn group_by( mut self, - value: Vec, + value: crate::datadogV1::model::FormulaAndFunctionEventQueryGroupByConfig, ) -> Self { self.group_by = Some(value); self @@ -127,7 +127,7 @@ impl<'de> Deserialize<'de> for FormulaAndFunctionEventQueryDefinition { crate::datadogV1::model::FormulaAndFunctionEventsDataSource, > = None; let mut group_by: Option< - Vec, + crate::datadogV1::model::FormulaAndFunctionEventQueryGroupByConfig, > = None; let mut indexes: Option> = None; let mut name: Option = None; @@ -170,6 +170,14 @@ impl<'de> Deserialize<'de> for FormulaAndFunctionEventQueryDefinition { continue; } group_by = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + if let Some(ref _group_by) = group_by { + match _group_by { + crate::datadogV1::model::FormulaAndFunctionEventQueryGroupByConfig::UnparsedObject(_group_by) => { + _unparsed = true; + }, + _ => {} + } + } } "indexes" => { if v.is_null() { diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by_config.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by_config.rs new file mode 100644 index 000000000..f799fc13f --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by_config.rs @@ -0,0 +1,49 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Deserializer, Serialize}; + +/// Group by configuration for a formula and functions events query. Accepts either a list of facet objects or a flat object that specifies a list of facet fields. +#[non_exhaustive] +#[derive(Clone, Debug, PartialEq, Serialize)] +#[serde(untagged)] +pub enum FormulaAndFunctionEventQueryGroupByConfig { + FormulaAndFunctionEventQueryGroupByList( + Vec, + ), + FormulaAndFunctionEventQueryGroupByFields( + Box, + ), + UnparsedObject(crate::datadog::UnparsedObject), +} + +impl<'de> Deserialize<'de> for FormulaAndFunctionEventQueryGroupByConfig { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let value: serde_json::Value = Deserialize::deserialize(deserializer)?; + if let Ok(_v) = serde_json::from_value::< + Vec, + >(value.clone()) + { + return Ok( + FormulaAndFunctionEventQueryGroupByConfig::FormulaAndFunctionEventQueryGroupByList( + _v, + ), + ); + } + if let Ok(_v) = serde_json::from_value::< + Box, + >(value.clone()) + { + if !_v._unparsed { + return Ok(FormulaAndFunctionEventQueryGroupByConfig::FormulaAndFunctionEventQueryGroupByFields(_v)); + } + } + + return Ok(FormulaAndFunctionEventQueryGroupByConfig::UnparsedObject( + crate::datadog::UnparsedObject { value }, + )); + } +} diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by_fields.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by_fields.rs new file mode 100644 index 000000000..69c4d0cbd --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by_fields.rs @@ -0,0 +1,131 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Flat group by configuration using multiple event facet fields. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct FormulaAndFunctionEventQueryGroupByFields { + /// List of event facets to group by. + #[serde(rename = "fields")] + pub fields: Vec, + /// Number of groups to return. + #[serde(rename = "limit")] + pub limit: Option, + /// Options for sorting group by results. + #[serde(rename = "sort")] + pub sort: Option, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl FormulaAndFunctionEventQueryGroupByFields { + pub fn new(fields: Vec) -> FormulaAndFunctionEventQueryGroupByFields { + FormulaAndFunctionEventQueryGroupByFields { + fields, + limit: None, + sort: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn limit(mut self, value: i64) -> Self { + self.limit = Some(value); + self + } + + pub fn sort( + mut self, + value: crate::datadogV1::model::FormulaAndFunctionEventQueryGroupBySort, + ) -> Self { + self.sort = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for FormulaAndFunctionEventQueryGroupByFields { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct FormulaAndFunctionEventQueryGroupByFieldsVisitor; + impl<'a> Visitor<'a> for FormulaAndFunctionEventQueryGroupByFieldsVisitor { + type Value = FormulaAndFunctionEventQueryGroupByFields; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut fields: Option> = None; + let mut limit: Option = None; + let mut sort: Option< + crate::datadogV1::model::FormulaAndFunctionEventQueryGroupBySort, + > = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "fields" => { + fields = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "limit" => { + if v.is_null() { + continue; + } + limit = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "sort" => { + if v.is_null() { + continue; + } + sort = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let fields = fields.ok_or_else(|| M::Error::missing_field("fields"))?; + + let content = FormulaAndFunctionEventQueryGroupByFields { + fields, + limit, + sort, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(FormulaAndFunctionEventQueryGroupByFieldsVisitor) + } +} diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.frozen index c35a420f4..6a94d75b4 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.frozen @@ -1 +1 @@ -2024-11-15T19:32:27.384Z \ No newline at end of file +2026-03-02T11:30:42.729Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.json index 6305c860c..b696445c9 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-distribution-widget-using-a-histogram-request-containing-a-formulas-and-functions-events-query.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"description\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147\",\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"compute\":{\"aggregation\":\"min\",\"metric\":\"@duration\"},\"data_source\":\"events\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}},\"request_type\":\"histogram\"}],\"show_legend\":false,\"title\":\"Events Platform - Request latency HOP\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0}}]}", + "string": "{\"description\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042\",\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"compute\":{\"aggregation\":\"min\",\"metric\":\"@duration\"},\"data_source\":\"events\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}},\"request_type\":\"histogram\"}],\"show_legend\":false,\"title\":\"Events Platform - Request latency HOP\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"p6k-cxc-g8m\",\"title\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147\",\"description\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1731699147\",\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/p6k-cxc-g8m/test-createadistributionwidgetusingahistogramrequestcontainingaformulasandfuncti\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"compute\":{\"aggregation\":\"min\",\"metric\":\"@duration\"},\"data_source\":\"events\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}},\"request_type\":\"histogram\"}],\"show_legend\":false,\"title\":\"Events Platform - Request latency HOP\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0},\"id\":8624507873468872}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:32:27.570354+00:00\",\"modified_at\":\"2024-11-15T19:32:27.570354+00:00\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"gz8-vqv-w54\",\"title\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042\",\"description\":\"Test-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu-1772451042\",\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/gz8-vqv-w54/test-createadistributionwidgetusingahistogramrequestcontainingaformulasandfuncti\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"compute\":{\"aggregation\":\"min\",\"metric\":\"@duration\"},\"data_source\":\"events\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}},\"request_type\":\"histogram\"}],\"show_legend\":false,\"title\":\"Events Platform - Request latency HOP\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"distribution\",\"xaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"},\"yaxis\":{\"include_zero\":true,\"max\":\"auto\",\"min\":\"auto\",\"scale\":\"linear\"}},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0},\"id\":4552786651040889}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:30:42.857797+00:00\",\"modified_at\":\"2026-03-02T11:30:42.857797+00:00\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:27 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:30:42 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/p6k-cxc-g8m" + "uri": "https://api.datadoghq.com/api/v1/dashboard/gz8-vqv-w54" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"p6k-cxc-g8m\"}\n", + "string": "{\"deleted_dashboard_id\":\"gz8-vqv-w54\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:27 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:30:42 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.frozen index b42d25287..449f5cd15 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.frozen @@ -1 +1 @@ -2025-12-08T10:46:15.353Z \ No newline at end of file +2026-03-02T11:30:56.185Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json index 2f3a1b743..e95abbb56 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-geomap-widget-with-conditional-formats-and-text-formats.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"description\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"layout_type\":\"ordered\",\"notify_list\":[],\"reflow_type\":\"fixed\",\"tags\":[],\"template_variables\":[],\"title\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"widgets\":[{\"definition\":{\"requests\":[{\"conditional_formats\":[{\"comparator\":\">\",\"palette\":\"white_on_green\",\"value\":1000}],\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"@type:session\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}},{\"columns\":[{\"field\":\"@network.client.geoip.location.latitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.location.longitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.country.iso_code\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.subdivision.name\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\",\"storage\":\"hot\"},\"response_format\":\"event_list\",\"style\":{\"color_by\":\"status\"},\"text_formats\":[{\"match\":{\"type\":\"is\",\"value\":\"error\"},\"palette\":\"white_on_red\"}]}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"Log Count by Service and Source\",\"type\":\"geomap\",\"view\":{\"focus\":\"NORTH_AMERICA\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0}}]}", + "string": "{\"description\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056\",\"layout_type\":\"ordered\",\"notify_list\":[],\"reflow_type\":\"fixed\",\"tags\":[],\"template_variables\":[],\"title\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056\",\"widgets\":[{\"definition\":{\"requests\":[{\"conditional_formats\":[{\"comparator\":\">\",\"palette\":\"white_on_green\",\"value\":1000}],\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"@type:session\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}},{\"columns\":[{\"field\":\"@network.client.geoip.location.latitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.location.longitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.country.iso_code\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.subdivision.name\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\",\"storage\":\"hot\"},\"response_format\":\"event_list\",\"style\":{\"color_by\":\"status\"},\"text_formats\":[{\"match\":{\"type\":\"is\",\"value\":\"error\"},\"palette\":\"white_on_red\"}]}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"Log Count by Service and Source\",\"type\":\"geomap\",\"view\":{\"focus\":\"NORTH_AMERICA\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"n2i-h6d-x6a\",\"title\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"description\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1765190775\",\"author_handle\":\"shishi.liu@datadoghq.com\",\"author_name\":\"Shishi Liu\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/n2i-h6d-x6a/test-createageomapwidgetwithconditionalformatsandtextformats-1765190775\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"conditional_formats\":[{\"comparator\":\">\",\"palette\":\"white_on_green\",\"value\":1000}],\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"@type:session\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}},{\"columns\":[{\"field\":\"@network.client.geoip.location.latitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.location.longitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.country.iso_code\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.subdivision.name\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\",\"storage\":\"hot\"},\"response_format\":\"event_list\",\"style\":{\"color_by\":\"status\"},\"text_formats\":[{\"match\":{\"type\":\"is\",\"value\":\"error\"},\"palette\":\"white_on_red\"}]}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"Log Count by Service and Source\",\"type\":\"geomap\",\"view\":{\"focus\":\"NORTH_AMERICA\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0},\"id\":4916490421180340}],\"notify_list\":[],\"created_at\":\"2025-12-08T10:46:15.791396+00:00\",\"modified_at\":\"2025-12-08T10:46:15.791396+00:00\",\"reflow_type\":\"fixed\",\"tags\":[],\"restricted_roles\":[]}", + "string": "{\"id\":\"bgt-jqb-knw\",\"title\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056\",\"description\":\"Test-Create_a_geomap_widget_with_conditional_formats_and_text_formats-1772451056\",\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/bgt-jqb-knw/test-createageomapwidgetwithconditionalformatsandtextformats-1772451056\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"conditional_formats\":[{\"comparator\":\">\",\"palette\":\"white_on_green\",\"value\":1000}],\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"@type:session\"}}],\"response_format\":\"scalar\",\"sort\":{\"count\":250,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}},{\"columns\":[{\"field\":\"@network.client.geoip.location.latitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.location.longitude\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.country.iso_code\",\"width\":\"auto\"},{\"field\":\"@network.client.geoip.subdivision.name\",\"width\":\"auto\"}],\"query\":{\"data_source\":\"logs_stream\",\"indexes\":[],\"query_string\":\"\",\"storage\":\"hot\"},\"response_format\":\"event_list\",\"style\":{\"color_by\":\"status\"},\"text_formats\":[{\"match\":{\"type\":\"is\",\"value\":\"error\"},\"palette\":\"white_on_red\"}]}],\"style\":{\"palette\":\"hostmap_blues\",\"palette_flip\":false},\"title\":\"Log Count by Service and Source\",\"type\":\"geomap\",\"view\":{\"focus\":\"NORTH_AMERICA\"}},\"layout\":{\"height\":6,\"width\":12,\"x\":0,\"y\":0},\"id\":5839657916661505}],\"notify_list\":[],\"created_at\":\"2026-03-02T11:30:56.347840+00:00\",\"modified_at\":\"2026-03-02T11:30:56.347840+00:00\",\"reflow_type\":\"fixed\",\"tags\":[],\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Mon, 08 Dec 2025 10:46:15 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:30:56 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/n2i-h6d-x6a" + "uri": "https://api.datadoghq.com/api/v1/dashboard/bgt-jqb-knw" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"n2i-h6d-x6a\"}", + "string": "{\"deleted_dashboard_id\":\"bgt-jqb-knw\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Mon, 08 Dec 2025 10:46:15 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:30:56 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.frozen index 15ab4cd26..030a994a8 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.frozen @@ -1 +1 @@ -2024-11-15T19:32:30.413Z \ No newline at end of file +2026-03-02T11:31:04.295Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.json index bf23d3e09..0d67bb56d 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-change-widget.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1731699150\",\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", + "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1772451064\",\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"pwu-pqa-fin\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1731699150\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/pwu-pqa-fin/test-createanewdashboardwithaformulasandfunctionschangewidget-1731699150\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":4495141746383449}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:32:30.566816+00:00\",\"modified_at\":\"2024-11-15T19:32:30.566816+00:00\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"tnn-avt-a8u\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_change_widget-1772451064\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/tnn-avt-a8u/test-createanewdashboardwithaformulasandfunctionschangewidget-1772451064\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":8404351906051529}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:31:04.419166+00:00\",\"modified_at\":\"2026-03-02T11:31:04.419166+00:00\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:30 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:04 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/pwu-pqa-fin" + "uri": "https://api.datadoghq.com/api/v1/dashboard/tnn-avt-a8u" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"pwu-pqa-fin\"}\n", + "string": "{\"deleted_dashboard_id\":\"tnn-avt-a8u\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:30 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:04 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.frozen index 218698317..188e62503 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.frozen @@ -1 +1 @@ -2024-11-15T19:32:30.862Z \ No newline at end of file +2026-03-02T11:31:11.876Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.json index 2007052f0..7bbc4e16e 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-formulas-and-functions-treemap-widget.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1731699150\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"title\":\"\",\"type\":\"treemap\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", + "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1772451071\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"title\":\"\",\"type\":\"treemap\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"sa5-czr-uat\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1731699150\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/sa5-czr-uat/test-createanewdashboardwithaformulasandfunctionstreemapwidget-1731699150\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"title\":\"\",\"type\":\"treemap\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":2892895408255139}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:32:31.032272+00:00\",\"modified_at\":\"2024-11-15T19:32:31.032272+00:00\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"ci5-4gc-khj\",\"title\":\"Test-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget-1772451071\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/ci5-4gc-khj/test-createanewdashboardwithaformulasandfunctionstreemapwidget-1772451071\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"title\":\"\",\"type\":\"treemap\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":3482978988980758}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:31:12.018143+00:00\",\"modified_at\":\"2026-03-02T11:31:12.018143+00:00\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:30 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:11 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/sa5-czr-uat" + "uri": "https://api.datadoghq.com/api/v1/dashboard/ci5-4gc-khj" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"sa5-czr-uat\"}\n", + "string": "{\"deleted_dashboard_id\":\"ci5-4gc-khj\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:30 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:11 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.frozen index f17762337..4356a9cd8 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.frozen @@ -1 +1 @@ -2024-11-15T19:32:36.010Z \ No newline at end of file +2026-03-02T11:31:19.426Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.json index ec9799ff9..415d58361 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-an-audit-logs-query.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_an_audit_logs_query-1731699156 with Audit Logs Query\",\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"audit\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":2,\"y\":0}}]}", + "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_an_audit_logs_query-1772451079 with Audit Logs Query\",\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"audit\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":2,\"y\":0}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"gu5-cq8-akb\",\"title\":\"Test-Create_a_new_dashboard_with_an_audit_logs_query-1731699156 with Audit Logs Query\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/gu5-cq8-akb/test-createanewdashboardwithanauditlogsquery-1731699156-with-audit-logs-query\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"audit\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":2,\"y\":0},\"id\":1074067237256022}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:32:36.200033+00:00\",\"modified_at\":\"2024-11-15T19:32:36.200033+00:00\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"u8e-wje-ac7\",\"title\":\"Test-Create_a_new_dashboard_with_an_audit_logs_query-1772451079 with Audit Logs Query\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/u8e-wje-ac7/test-createanewdashboardwithanauditlogsquery-1772451079-with-audit-logs-query\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"audit\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":2,\"y\":0},\"id\":3153401975327610}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:31:19.790638+00:00\",\"modified_at\":\"2026-03-02T11:31:19.790638+00:00\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:36 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:19 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/gu5-cq8-akb" + "uri": "https://api.datadoghq.com/api/v1/dashboard/u8e-wje-ac7" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"gu5-cq8-akb\"}\n", + "string": "{\"deleted_dashboard_id\":\"u8e-wje-ac7\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:36 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:19 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-facet-group-by.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-facet-group-by.frozen new file mode 100644 index 000000000..28bcf5a21 --- /dev/null +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-facet-group-by.frozen @@ -0,0 +1 @@ +2026-03-02T11:31:55.658Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-facet-group-by.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-facet-group-by.json new file mode 100644 index 000000000..4996198f4 --- /dev/null +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-facet-group-by.json @@ -0,0 +1,67 @@ +{ + "http_interactions": [ + { + "request": { + "body": { + "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by-1772451115 with events facet group_by\",\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"events\",\"group_by\":[{\"facet\":\"service\",\"limit\":10}],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0}}]}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v1/dashboard" + }, + "response": { + "body": { + "string": "{\"id\":\"ju2-xz8-5m5\",\"title\":\"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_facet_group_by-1772451115 with events facet group_by\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/ju2-xz8-5m5/test-createanewdashboardwithformulasandfunctionseventsqueryusingfacetgroupby-177\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"events\",\"group_by\":[{\"facet\":\"service\",\"limit\":10}],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0},\"id\":810193426998809}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:31:55.791459+00:00\",\"modified_at\":\"2026-03-02T11:31:55.791459+00:00\",\"restricted_roles\":[]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 02 Mar 2026 11:31:55 GMT" + }, + { + "request": { + "body": "", + "headers": { + "Accept": [ + "application/json" + ] + }, + "method": "delete", + "uri": "https://api.datadoghq.com/api/v1/dashboard/ju2-xz8-5m5" + }, + "response": { + "body": { + "string": "{\"deleted_dashboard_id\":\"ju2-xz8-5m5\"}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 02 Mar 2026 11:31:55 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-flat-group-by-fields.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-flat-group-by-fields.frozen new file mode 100644 index 000000000..d5798d279 --- /dev/null +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-flat-group-by-fields.frozen @@ -0,0 +1 @@ +2026-03-02T11:32:08.470Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-flat-group-by-fields.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-flat-group-by-fields.json new file mode 100644 index 000000000..7b5a14b2f --- /dev/null +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-formulas-and-functions-events-query-using-flat-group-by-fields.json @@ -0,0 +1,67 @@ +{ + "http_interactions": [ + { + "request": { + "body": { + "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields-1772451128 with events flat group_by fields\",\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"events\",\"group_by\":{\"fields\":[\"service\",\"host\"],\"limit\":10},\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0}}]}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v1/dashboard" + }, + "response": { + "body": { + "string": "{\"id\":\"fr8-fsd-e2q\",\"title\":\"Test-Create_a_new_dashboard_with_formulas_and_functions_events_query_using_flat_group_by_fields-1772451128 with events flat group_by fields\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/fr8-fsd-e2q/test-createanewdashboardwithformulasandfunctionseventsqueryusingflatgroupbyfield\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"events\",\"group_by\":{\"fields\":[\"service\",\"host\"],\"limit\":10},\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"timeseries\"}],\"type\":\"timeseries\"},\"layout\":{\"height\":2,\"width\":4,\"x\":0,\"y\":0},\"id\":1614310387548006}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:32:08.617154+00:00\",\"modified_at\":\"2026-03-02T11:32:08.617154+00:00\",\"restricted_roles\":[]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 02 Mar 2026 11:32:08 GMT" + }, + { + "request": { + "body": "", + "headers": { + "Accept": [ + "application/json" + ] + }, + "method": "delete", + "uri": "https://api.datadoghq.com/api/v1/dashboard/fr8-fsd-e2q" + }, + "response": { + "body": { + "string": "{\"deleted_dashboard_id\":\"fr8-fsd-e2q\"}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 02 Mar 2026 11:32:08 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.frozen index 6a7b25ee7..a5c1be847 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-11-15T19:32:44.075Z \ No newline at end of file +2026-03-02T11:31:32.400Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.json index 3f71cb611..eeca0ad53 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-invalid-team-tags-returns-Bad-Request-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"tags\":[\"tm:foobar\"],\"title\":\"Test-Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response-1731699164\",\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", + "string": "{\"layout_type\":\"ordered\",\"tags\":[\"tm:foobar\"],\"title\":\"Test-Create_a_new_dashboard_with_invalid_team_tags_returns_Bad_Request_response-1772451092\",\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"errors\":[\"Invalid tag format. Tag key must be `team`.\"]}", + "string": "{\"errors\":[\"Invalid tag format. Valid tag keys are: team.\"]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Bad Request" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:44 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:32 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.frozen index e14f7424c..b1fc72f49 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.frozen @@ -1 +1 @@ -2024-11-15T19:32:46.182Z \ No newline at end of file +2026-03-02T11:31:40.100Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.json index 659ea7529..b3b4a0424 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-logs-query-table-widget-and-storage-parameter.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1731699166 with query table widget and storage parameter\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"cell_display_mode\":\"bar\",\"conditional_formats\":[],\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"},\"storage\":\"online_archives\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":50,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"type\":\"query_table\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1772451100 with query table widget and storage parameter\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"cell_display_mode\":\"bar\",\"conditional_formats\":[],\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"},\"storage\":\"online_archives\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":50,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"type\":\"query_table\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"3bi-3is-gj3\",\"title\":\"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1731699166 with query table widget and storage parameter\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/3bi-3is-gj3/test-createanewdashboardwithlogsquerytablewidgetandstorageparameter-1731699166-w\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"cell_display_mode\":\"bar\",\"conditional_formats\":[],\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"},\"storage\":\"online_archives\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":50,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"type\":\"query_table\"},\"id\":6318589982774362}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:32:46.331888+00:00\",\"modified_at\":\"2024-11-15T19:32:46.331888+00:00\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"w66-sbc-bdb\",\"title\":\"Test-Create_a_new_dashboard_with_logs_query_table_widget_and_storage_parameter-1772451100 with query table widget and storage parameter\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/w66-sbc-bdb/test-createanewdashboardwithlogsquerytablewidgetandstorageparameter-1772451100-w\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"cell_display_mode\":\"bar\",\"conditional_formats\":[],\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"},\"storage\":\"online_archives\"}],\"response_format\":\"scalar\",\"sort\":{\"count\":50,\"order_by\":[{\"index\":0,\"order\":\"desc\",\"type\":\"formula\"}]}}],\"type\":\"query_table\"},\"id\":3019646668045057}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:31:40.238249+00:00\",\"modified_at\":\"2026-03-02T11:31:40.238249+00:00\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:46 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:40 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/3bi-3is-gj3" + "uri": "https://api.datadoghq.com/api/v1/dashboard/w66-sbc-bdb" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"3bi-3is-gj3\"}\n", + "string": "{\"deleted_dashboard_id\":\"w66-sbc-bdb\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:46 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:40 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.frozen index a85903d2b..3808feb8a 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.frozen @@ -1 +1 @@ -2024-11-15T19:32:57.038Z \ No newline at end of file +2026-03-02T11:31:48.054Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.json index 9198b9d01..83d9df406 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-team-tags-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"tags\":[\"team:foobar\"],\"title\":\"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1731699177\",\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", + "string": "{\"layout_type\":\"ordered\",\"tags\":[\"team:foobar\"],\"title\":\"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1772451108\",\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"zb6-66m-ntf\",\"title\":\"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1731699177\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/zb6-66m-ntf/test-createanewdashboardwithteamtagsreturnsokresponse-1731699177\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":5234430955769094}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:32:57.190291+00:00\",\"modified_at\":\"2024-11-15T19:32:57.190291+00:00\",\"tags\":[\"team:foobar\"],\"restricted_roles\":[]}\n", + "string": "{\"id\":\"9y6-h2y-3cw\",\"title\":\"Test-Create_a_new_dashboard_with_team_tags_returns_OK_response-1772451108\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/9y6-h2y-3cw/test-createanewdashboardwithteamtagsreturnsokresponse-1772451108\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"change_type\":\"absolute\",\"compare_to\":\"hour_before\",\"formulas\":[{\"formula\":\"hour_before(query1)\"},{\"formula\":\"query1\"}],\"increase_good\":true,\"order_by\":\"change\",\"order_dir\":\"desc\",\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"logs\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"\"}}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"change\"},\"layout\":{\"height\":4,\"width\":4,\"x\":0,\"y\":0},\"id\":3025185757829094}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:31:48.191609+00:00\",\"modified_at\":\"2026-03-02T11:31:48.191609+00:00\",\"tags\":[\"team:foobar\"],\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:57 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:48 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/zb6-66m-ntf" + "uri": "https://api.datadoghq.com/api/v1/dashboard/9y6-h2y-3cw" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"zb6-66m-ntf\"}\n", + "string": "{\"deleted_dashboard_id\":\"9y6-h2y-3cw\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:32:57 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:31:48 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.frozen index acc6b9445..ef99a24fc 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.frozen @@ -1 +1 @@ -2024-11-15T19:33:01.264Z \ No newline at end of file +2026-03-02T11:32:16.355Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.json index bd8744f36..196013dd5 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-pipelines-data-source.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1731699181 with ci_pipelines datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1772451136 with ci_pipelines datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"c2y-k8z-ghy\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1731699181 with ci_pipelines datasource\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/c2y-k8z-ghy/test-createanewtimeserieswidgetwithcipipelinesdatasource-1731699181-with-cipipel\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":7421904402454882}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:33:01.435760+00:00\",\"modified_at\":\"2024-11-15T19:33:01.435760+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"ikx-wys-byr\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_pipelines_data_source-1772451136 with ci_pipelines datasource\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/ikx-wys-byr/test-createanewtimeserieswidgetwithcipipelinesdatasource-1772451136-with-cipipel\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":8543991818867248}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:32:16.504264+00:00\",\"modified_at\":\"2026-03-02T11:32:16.504264+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:33:01 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:16 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/c2y-k8z-ghy" + "uri": "https://api.datadoghq.com/api/v1/dashboard/ikx-wys-byr" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"c2y-k8z-ghy\"}\n", + "string": "{\"deleted_dashboard_id\":\"ikx-wys-byr\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:33:01 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:16 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.frozen index 6c2c78659..99f73e6ef 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.frozen @@ -1 +1 @@ -2024-11-15T19:33:01.698Z \ No newline at end of file +2026-03-02T11:32:24.328Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.json index c81c8aeac..e0d1fc415 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-ci-tests-data-source.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1731699181 with ci_tests datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"ci_tests\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1772451144 with ci_tests datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"ci_tests\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"j89-gve-ggt\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1731699181 with ci_tests datasource\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/j89-gve-ggt/test-createanewtimeserieswidgetwithcitestsdatasource-1731699181-with-citests-dat\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"ci_tests\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":6228011042051238}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:33:01.854077+00:00\",\"modified_at\":\"2024-11-15T19:33:01.854077+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"f66-zye-xua\",\"title\":\"Test-Create_a_new_timeseries_widget_with_ci_tests_data_source-1772451144 with ci_tests datasource\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/f66-zye-xua/test-createanewtimeserieswidgetwithcitestsdatasource-1772451144-with-citests-dat\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"ci_tests\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":385385549859535}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:32:24.462023+00:00\",\"modified_at\":\"2026-03-02T11:32:24.462023+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:33:01 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:24 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/j89-gve-ggt" + "uri": "https://api.datadoghq.com/api/v1/dashboard/f66-zye-xua" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"j89-gve-ggt\"}\n", + "string": "{\"deleted_dashboard_id\":\"f66-zye-xua\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:33:01 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:24 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.frozen index 62d6285a0..9e4af164f 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.frozen @@ -1 +1 @@ -2024-11-15T19:33:02.114Z \ No newline at end of file +2026-03-02T11:32:32.300Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.json index 0701910fb..61ce264c7 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-incident-analytics-data-source.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1731699182 with incident_analytics datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"incident_analytics\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1772451152 with incident_analytics datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"incident_analytics\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"acy-6e4-hcx\",\"title\":\"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1731699182 with incident_analytics datasource\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/acy-6e4-hcx/test-createanewtimeserieswidgetwithincidentanalyticsdatasource-1731699182-with-i\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"incident_analytics\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":1892327793861749}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:33:02.279466+00:00\",\"modified_at\":\"2024-11-15T19:33:02.279466+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}\n", + "string": "{\"id\":\"2er-mww-6yj\",\"title\":\"Test-Create_a_new_timeseries_widget_with_incident_analytics_data_source-1772451152 with incident_analytics datasource\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/2er-mww-6yj/test-createanewtimeserieswidgetwithincidentanalyticsdatasource-1772451152-with-i\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"incident_analytics\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":2433009372435309}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:32:32.438274+00:00\",\"modified_at\":\"2026-03-02T11:32:32.438274+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:33:02 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:32 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/acy-6e4-hcx" + "uri": "https://api.datadoghq.com/api/v1/dashboard/2er-mww-6yj" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"acy-6e4-hcx\"}\n", + "string": "{\"deleted_dashboard_id\":\"2er-mww-6yj\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Fri, 15 Nov 2024 19:33:02 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:32 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.frozen index 6cbda14f1..623625b0e 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.frozen @@ -1 +1 @@ -2025-08-26T19:47:58.449Z \ No newline at end of file +2026-03-02T11:32:44.844Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.json index f007005e7..3576e4a05 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-legacy-live-span-time-format.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1756237678 with legacy live span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1772451164 with legacy live span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"wek-eci-qnn\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1756237678 with legacy live span time\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/wek-eci-qnn/test-createanewtimeserieswidgetwithlegacylivespantimeformat-1756237678-with-lega\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"},\"id\":3088384387119347}],\"notify_list\":null,\"created_at\":\"2025-08-26T19:47:58.616519+00:00\",\"modified_at\":\"2025-08-26T19:47:58.616519+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", + "string": "{\"id\":\"vk5-d2n-u64\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1772451164 with legacy live span time\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/vk5-d2n-u64/test-createanewtimeserieswidgetwithlegacylivespantimeformat-1772451164-with-lega\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"},\"id\":6488713900601904}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:32:44.975524+00:00\",\"modified_at\":\"2026-03-02T11:32:44.975524+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 26 Aug 2025 19:47:58 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:44 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/wek-eci-qnn" + "uri": "https://api.datadoghq.com/api/v1/dashboard/vk5-d2n-u64" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"wek-eci-qnn\"}\n", + "string": "{\"deleted_dashboard_id\":\"vk5-d2n-u64\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 26 Aug 2025 19:47:58 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:44 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.frozen index 954a95884..c5e47817f 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.frozen @@ -1 +1 @@ -2025-08-26T19:47:58.908Z \ No newline at end of file +2026-03-02T11:32:52.742Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.json index 6c8bd915a..1f4c98cf3 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-fixed-span-time-format.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1756237678 with new fixed span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"from\":1712080128,\"hide_incomplete_cost_data\":true,\"to\":1712083128,\"type\":\"fixed\"},\"title\":\"\",\"type\":\"timeseries\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1772451172 with new fixed span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"from\":1712080128,\"hide_incomplete_cost_data\":true,\"to\":1712083128,\"type\":\"fixed\"},\"title\":\"\",\"type\":\"timeseries\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"43b-7uw-9hv\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1756237678 with new fixed span time\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/43b-7uw-9hv/test-createanewtimeserieswidgetwithnewfixedspantimeformat-1756237678-with-new-fi\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"from\":1712080128,\"hide_incomplete_cost_data\":true,\"to\":1712083128,\"type\":\"fixed\"},\"title\":\"\",\"type\":\"timeseries\"},\"id\":7908755715912813}],\"notify_list\":null,\"created_at\":\"2025-08-26T19:47:59.063106+00:00\",\"modified_at\":\"2025-08-26T19:47:59.063106+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", + "string": "{\"id\":\"tyc-7bs-dg2\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_fixed_span_time_format-1772451172 with new fixed span time\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/tyc-7bs-dg2/test-createanewtimeserieswidgetwithnewfixedspantimeformat-1772451172-with-new-fi\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"from\":1712080128,\"hide_incomplete_cost_data\":true,\"to\":1712083128,\"type\":\"fixed\"},\"title\":\"\",\"type\":\"timeseries\"},\"id\":3025372441855102}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:32:53.112506+00:00\",\"modified_at\":\"2026-03-02T11:32:53.112506+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 26 Aug 2025 19:47:58 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:52 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/43b-7uw-9hv" + "uri": "https://api.datadoghq.com/api/v1/dashboard/tyc-7bs-dg2" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"43b-7uw-9hv\"}\n", + "string": "{\"deleted_dashboard_id\":\"tyc-7bs-dg2\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 26 Aug 2025 19:47:58 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:32:52 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.frozen index b4d5164c5..517d03c99 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.frozen @@ -1 +1 @@ -2025-08-26T19:47:59.336Z \ No newline at end of file +2026-03-02T11:33:01.159Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.json index 38d1e4fe4..0cf2b3213 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-new-live-span-time-format.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1756237679 with new live span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"type\":\"live\",\"unit\":\"minute\",\"value\":8},\"title\":\"\",\"type\":\"timeseries\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1772451181 with new live span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"type\":\"live\",\"unit\":\"minute\",\"value\":8},\"title\":\"\",\"type\":\"timeseries\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"gwt-rfa-qem\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1756237679 with new live span time\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/gwt-rfa-qem/test-createanewtimeserieswidgetwithnewlivespantimeformat-1756237679-with-new-liv\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"type\":\"live\",\"unit\":\"minute\",\"value\":8},\"title\":\"\",\"type\":\"timeseries\"},\"id\":6382558947547501}],\"notify_list\":null,\"created_at\":\"2025-08-26T19:47:59.501406+00:00\",\"modified_at\":\"2025-08-26T19:47:59.501406+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", + "string": "{\"id\":\"j9i-er8-3fp\",\"title\":\"Test-Create_a_new_timeseries_widget_with_new_live_span_time_format-1772451181 with new live span time\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/j9i-er8-3fp/test-createanewtimeserieswidgetwithnewlivespantimeformat-1772451181-with-new-liv\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"type\":\"live\",\"unit\":\"minute\",\"value\":8},\"title\":\"\",\"type\":\"timeseries\"},\"id\":6064667163154272}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:33:01.307731+00:00\",\"modified_at\":\"2026-03-02T11:33:01.307731+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 26 Aug 2025 19:47:59 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:33:01 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/gwt-rfa-qem" + "uri": "https://api.datadoghq.com/api/v1/dashboard/j9i-er8-3fp" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"gwt-rfa-qem\"}\n", + "string": "{\"deleted_dashboard_id\":\"j9i-er8-3fp\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 26 Aug 2025 19:47:59 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:33:01 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.frozen index ccf84dbc1..936b6e845 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.frozen @@ -1 +1 @@ -2025-09-18T18:51:17.951Z \ No newline at end of file +2026-03-02T11:33:08.812Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.json index 889f960f0..43dc2aa75 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-timeseries-widget-with-product-analytics-data-source.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1758221477 with product_analytics datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"product_analytics\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", + "string": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1772451188 with product_analytics datasource\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"product_analytics\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"}}]}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"id\":\"zvr-td5-ppm\",\"title\":\"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1758221477 with product_analytics datasource\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/zvr-td5-ppm/test-createanewtimeserieswidgetwithproductanalyticsdatasource-1758221477-with-pr\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"product_analytics\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":6058978575853641}],\"notify_list\":null,\"created_at\":\"2025-09-18T18:51:18.107135+00:00\",\"modified_at\":\"2025-09-18T18:51:18.107135+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", + "string": "{\"id\":\"i2r-t4n-8wa\",\"title\":\"Test-Create_a_new_timeseries_widget_with_product_analytics_data_source-1772451188 with product_analytics datasource\",\"description\":null,\"author_handle\":\"archana.asokan@datadoghq.com\",\"author_name\":\"Archana Asokan\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/i2r-t4n-8wa/test-createanewtimeserieswidgetwithproductanalyticsdatasource-1772451188-with-pr\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"product_analytics\",\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"test_level:test\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{},\"title\":\"\",\"type\":\"timeseries\"},\"id\":2831258963755573}],\"notify_list\":null,\"created_at\":\"2026-03-02T11:33:08.943469+00:00\",\"modified_at\":\"2026-03-02T11:33:08.943469+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 18 Sep 2025 18:51:17 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:33:08 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v1/dashboard/zvr-td5-ppm" + "uri": "https://api.datadoghq.com/api/v1/dashboard/i2r-t4n-8wa" }, "response": { "body": { - "string": "{\"deleted_dashboard_id\":\"zvr-td5-ppm\"}\n", + "string": "{\"deleted_dashboard_id\":\"i2r-t4n-8wa\"}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 18 Sep 2025 18:51:17 GMT" + "recorded_at": "Mon, 02 Mar 2026 11:33:08 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen index 957e037f2..62723cd8d 100644 --- a/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen @@ -1 +1 @@ -2026-02-18T16:57:05.121Z \ No newline at end of file +2026-01-07T12:38:45.716Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.json b/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.json index 5ca68869f..d3ec9a345 100644 --- a/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/synthetics/Create-a-test-suite-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"type\":\"suites\",\"attributes\":{\"type\":\"suite\",\"monitor_id\":259845717,\"name\":\"Example suite name\",\"options\":{},\"tests\":[],\"tags\":[\"env:production\"],\"public_id\":\"hik-xp5-9q6\",\"created_at\":\"2026-02-18T16:57:05.583051+00:00\",\"modified_at\":\"2026-02-18T16:57:05.583051+00:00\",\"created_by\":{\"name\":\"Corentin Girard\",\"email\":\"corentin.girard@datadoghq.com\",\"handle\":\"corentin.girard@datadoghq.com\"},\"message\":\"Notification message\",\"org_id\":321813,\"modified_by\":{\"name\":\"Corentin Girard\",\"email\":\"corentin.girard@datadoghq.com\",\"handle\":\"corentin.girard@datadoghq.com\"}},\"id\":\"hik-xp5-9q6\"}}\n", + "string": "{\"data\":{\"type\":\"suites\",\"id\":\"36n-bb6-njj\",\"attributes\":{\"tags\":[\"env:production\"],\"type\":\"suite\",\"created_by\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"created_at\":\"2026-01-07T12:38:46.109472+00:00\",\"modified_at\":\"2026-01-07T12:38:46.109472+00:00\",\"message\":\"Notification message\",\"public_id\":\"36n-bb6-njj\",\"options\":{},\"modified_by\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"tests\":[],\"name\":\"Example suite name\",\"org_id\":321813,\"monitor_id\":249141773}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "OK" } }, - "recorded_at": "Wed, 18 Feb 2026 16:57:05 GMT" + "recorded_at": "Wed, 07 Jan 2026 12:38:45 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"public_ids\":[\"hik-xp5-9q6\"]},\"type\":\"delete_suites_request\"}}", + "string": "{\"data\":{\"attributes\":{\"public_ids\":[\"36n-bb6-njj\"]},\"type\":\"delete_suites_request\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "response": { "body": { - "string": "{\"data\":[{\"type\":\"suites\",\"attributes\":{\"deleted_at\":\"2026-02-18 16:57:06.420679\",\"public_id\":\"hik-xp5-9q6\"},\"id\":\"hik-xp5-9q6\"}]}\n", + "string": "{\"data\":[{\"type\":\"suites\",\"attributes\":{\"public_id\":\"36n-bb6-njj\",\"deleted_at\":\"2026-01-07 12:38:46.679914\"},\"id\":\"36n-bb6-njj\"}]}\n", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 18 Feb 2026 16:57:05 GMT" + "recorded_at": "Wed, 07 Jan 2026 12:38:45 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index 349f7de6f..5a243eb4b 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/dashboards.feature @@ -38,7 +38,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a distribution widget using a histogram request containing a formulas and functions events query Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "description": "{{ unique }}", "widgets": [ { "definition": { "title": "Events Platform - Request latency HOP", "title_size": "16", "title_align": "left", "show_legend": false, "type": "distribution", "xaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "yaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "requests": [ { "query": { "search": { "query": "" }, "data_source": "events", "compute": { "metric": "@duration", "aggregation": "min" }, "name": "query1", "indexes": [ "*" ], "group_by": [] }, "request_type": "histogram" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "description": "{{ unique }}", "widgets": [ { "definition": { "title": "Events Platform - Request latency HOP", "title_size": "16", "title_align": "left", "show_legend": false, "type": "distribution", "xaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "yaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "requests": [ { "query": { "search": { "query": "" }, "data_source": "events", "compute": { "metric": "@duration", "aggregation": "min" }, "name": "query1", "indexes": [ "*" ] }, "request_type": "histogram" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].request_type" is equal to "histogram" @@ -48,7 +48,6 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].query.compute.aggregation" is equal to "min" And the response "widgets[0].definition.requests[0].query.name" is equal to "query1" And the response "widgets[0].definition.requests[0].query.indexes" is equal to ["*"] - And the response "widgets[0].definition.requests[0].query.group_by" is equal to [] @team:DataDog/dashboards-backend Scenario: Create a distribution widget using a histogram request containing a formulas and functions metrics query @@ -75,7 +74,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a geomap widget with conditional formats and text formats Given new "CreateDashboard" request - And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"Log Count by Service and Source","type":"geomap","requests":[{"response_format":"scalar","queries":[{"data_source":"rum","name":"query1","search":{"query":"@type:session"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"conditional_formats":[{"comparator":">","value":1000,"palette":"white_on_green"}],"formulas":[{"formula":"query1"}],"sort":{"count":250,"order_by":[{"type":"formula","index":0,"order":"desc"}]}},{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[],"storage":"hot"},"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"NORTH_AMERICA"}},"layout":{"x":0,"y":0,"width":12,"height":6}}],"template_variables":[],"layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[]} + And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"Log Count by Service and Source","type":"geomap","requests":[{"response_format":"scalar","queries":[{"data_source":"rum","name":"query1","search":{"query":"@type:session"},"indexes":["*"],"compute":{"aggregation":"count"}}],"conditional_formats":[{"comparator":">","value":1000,"palette":"white_on_green"}],"formulas":[{"formula":"query1"}],"sort":{"count":250,"order_by":[{"type":"formula","index":0,"order":"desc"}]}},{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[],"storage":"hot"},"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"}],"style":{"color_by":"status"},"text_formats":[{"match":{"type":"is","value":"error"},"palette":"white_on_red"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"NORTH_AMERICA"}},"layout":{"x":0,"y":0,"width":12,"height":6}}],"template_variables":[],"layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[]} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.type" is equal to "geomap" @@ -144,7 +143,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with a formulas and functions change widget Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" @@ -162,7 +161,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with a formulas and functions treemap widget Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "type": "treemap", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "type": "treemap", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" @@ -296,7 +295,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with an audit logs query Given new "CreateDashboard" request - And body with value {"layout_type": "ordered", "title": "{{ unique }} with Audit Logs Query", "widgets": [{"definition": {"type": "timeseries","requests": [{"response_format": "timeseries","queries": [{"search": {"query": ""},"data_source": "audit","compute": {"aggregation": "count"},"name": "query1","indexes": ["*"],"group_by": []}]}]},"layout": {"x": 2,"y": 0,"width": 4,"height": 2}}]} + And body with value {"layout_type": "ordered", "title": "{{ unique }} with Audit Logs Query", "widgets": [{"definition": {"type": "timeseries","requests": [{"response_format": "timeseries","queries": [{"search": {"query": ""},"data_source": "audit","compute": {"aggregation": "count"},"name": "query1","indexes": ["*"]}]}]},"layout": {"x": 2,"y": 0,"width": 4,"height": 2}}]} When the request is sent Then the response status is 200 OK And the response "title" is equal to "{{ unique }} with Audit Logs Query" @@ -466,6 +465,27 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "metrics" And the response "widgets[0].definition.requests[0].style.palette" is equal to "dog_classic" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with formulas and functions events query using facet group by + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }} with events facet group_by", "widgets": [{"definition": {"type": "timeseries", "requests": [{"response_format": "timeseries", "queries": [{"data_source": "events", "name": "query1", "search": {"query": ""}, "compute": {"aggregation": "count"}, "group_by": [{"facet": "service", "limit": 10}]}]}]}, "layout": {"x": 0, "y": 0, "width": 4, "height": 2}}], "layout_type": "ordered"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "events" + And the response "widgets[0].definition.requests[0].queries[0].group_by[0].facet" is equal to "service" + And the response "widgets[0].definition.requests[0].queries[0].group_by[0].limit" is equal to 10 + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with formulas and functions events query using flat group by fields + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }} with events flat group_by fields", "widgets": [{"definition": {"type": "timeseries", "requests": [{"response_format": "timeseries", "queries": [{"data_source": "events", "name": "query1", "search": {"query": ""}, "compute": {"aggregation": "count"}, "group_by": {"fields": ["service", "host"], "limit": 10}}]}]}, "layout": {"x": 0, "y": 0, "width": 4, "height": 2}}], "layout_type": "ordered"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "events" + And the response "widgets[0].definition.requests[0].queries[0].group_by.fields[0]" is equal to "service" + And the response "widgets[0].definition.requests[0].queries[0].group_by.fields[1]" is equal to "host" + And the response "widgets[0].definition.requests[0].queries[0].group_by.limit" is equal to 10 + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with formulas and functions scatterplot widget Given new "CreateDashboard" request @@ -568,7 +588,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with invalid team tags returns "Bad Request" response Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["tm:foobar"], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["tm:foobar"], "layout_type": "ordered" } When the request is sent Then the response status is 400 Bad Request @@ -628,7 +648,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with logs query table widget and storage parameter Given new "CreateDashboard" request - And body with value {"layout_type":"ordered","title":"{{ unique }} with query table widget and storage parameter","widgets":[{"definition":{"type":"query_table","requests":[{"queries":[{"data_source":"logs","name":"query1","search":{"query":""},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[],"storage":"online_archives"}],"formulas":[{"conditional_formats":[],"cell_display_mode":"bar","formula":"query1"}],"sort":{"count":50, "order_by":[{"type":"formula","index":0,"order":"desc"}]},"response_format":"scalar"}]}}]} + And body with value {"layout_type":"ordered","title":"{{ unique }} with query table widget and storage parameter","widgets":[{"definition":{"type":"query_table","requests":[{"queries":[{"data_source":"logs","name":"query1","search":{"query":""},"indexes":["*"],"compute":{"aggregation":"count"},"storage":"online_archives"}],"formulas":[{"conditional_formats":[],"cell_display_mode":"bar","formula":"query1"}],"sort":{"count":50, "order_by":[{"type":"formula","index":0,"order":"desc"}]},"response_format":"scalar"}]}}]} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.type" is equal to "query_table" @@ -867,7 +887,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new dashboard with team tags returns "OK" response Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["team:foobar"], "layout_type": "ordered" } + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" } } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["team:foobar"], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK And the response "title" is equal to "{{ unique }}" @@ -1030,7 +1050,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with ci_pipelines data source Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with ci_pipelines 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":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with ci_pipelines 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":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "ci_pipelines" @@ -1039,7 +1059,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with ci_tests data source Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with ci_tests 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":"ci_tests","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"} + And body with value {"title":"{{ unique }} with ci_tests 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":"ci_tests","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "ci_tests" @@ -1048,7 +1068,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with incident_analytics data source Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with incident_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":"incident_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"} + And body with value {"title":"{{ unique }} with incident_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":"incident_analytics","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "incident_analytics" @@ -1057,7 +1077,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with legacy live span time format Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with legacy live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"live_span": "5m", "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with legacy live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"live_span": "5m", "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.time.live_span" is equal to "5m" @@ -1066,7 +1086,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with new fixed span time format Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with new fixed span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "fixed", "from": 1712080128, "to": 1712083128, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with new fixed span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "fixed", "from": 1712080128, "to": 1712083128, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.time.type" is equal to "fixed" @@ -1077,7 +1097,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with new live span time format Given new "CreateDashboard" request - And body with value {"title":"{{ unique }} with new live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "live", "unit": "minute", "value": 8, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + And body with value {"title":"{{ unique }} with new live span time","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{"type": "live", "unit": "minute", "value": 8, "hide_incomplete_cost_data": true},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.time.type" is equal to "live" @@ -1088,7 +1108,7 @@ Feature: Dashboards @team:DataDog/dashboards-backend Scenario: Create a new timeseries widget with product_analytics data source Given new "CreateDashboard" request - 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"} + 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"}}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} When the request is sent Then the response status is 200 OK And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "product_analytics"