From 1b07a9d7a8c9dd91e0023f8f21cd58c9d8f40904 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 4 Jan 2022 16:14:59 +0000 Subject: [PATCH] Regenerate client from commit 116ef08 of spec repo (#1271) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- .../dashboards/CreateDashboard_1177423752.go | 61 ++++++ .../dashboards/CreateDashboard_1200099236.go | 64 ++++++ .../dashboards/CreateDashboard_1213075383.go | 76 +++++++ .../dashboards/CreateDashboard_173805046.go | 62 ++++++ .../dashboards/CreateDashboard_1738608750.go | 53 +++++ .../dashboards/CreateDashboard_2029850837.go | 67 ++++++ .../dashboards/CreateDashboard_2034634967.go | 57 ++++++ .../dashboards/CreateDashboard_2308247857.go | 57 ++++++ .../dashboards/CreateDashboard_2316374332.go | 58 ++++++ .../dashboards/CreateDashboard_2336428357.go | 79 ++++++++ .../dashboards/CreateDashboard_2342457693.go | 99 +++++++++ .../dashboards/CreateDashboard_2349863258.go | 69 +++++++ .../dashboards/CreateDashboard_2607944105.go | 56 +++++ .../dashboards/CreateDashboard_2634813877.go | 55 +++++ .../dashboards/CreateDashboard_2917274132.go | 58 ++++++ .../dashboards/CreateDashboard_2921337351.go | 62 ++++++ .../dashboards/CreateDashboard_3250131584.go | 54 +++++ .../dashboards/CreateDashboard_417992286.go | 50 +++++ .../dashboards/CreateDashboard_651038379.go | 51 +++++ .../dashboards/CreateDashboard_913313564.go | 50 +++++ .../dashboards/CreateDashboard_915214113.go | 100 +++++++++ ...w_dashboard_with_alert_graph_widget.freeze | 1 + ...new_dashboard_with_alert_graph_widget.yaml | 76 +++++++ ...w_dashboard_with_alert_value_widget.freeze | 1 + ...new_dashboard_with_alert_value_widget.yaml | 76 +++++++ ..._dashboard_with_check_status_widget.freeze | 1 + ...ew_dashboard_with_check_status_widget.yaml | 37 ++++ ..._dashboard_with_event_stream_widget.freeze | 1 + ...ew_dashboard_with_event_stream_widget.yaml | 37 ++++ ...ashboard_with_event_timeline_widget.freeze | 1 + ..._dashboard_with_event_timeline_widget.yaml | 38 ++++ ...new_dashboard_with_free_text_widget.freeze | 1 + ...a_new_dashboard_with_free_text_widget.yaml | 38 ++++ ..._a_new_dashboard_with_geomap_widget.freeze | 1 + ...te_a_new_dashboard_with_geomap_widget.yaml | 37 ++++ ...a_new_dashboard_with_heatmap_widget.freeze | 1 + ...e_a_new_dashboard_with_heatmap_widget.yaml | 38 ++++ ...a_new_dashboard_with_hostmap_widget.freeze | 1 + ...e_a_new_dashboard_with_hostmap_widget.yaml | 38 ++++ ..._a_new_dashboard_with_iframe_widget.freeze | 1 + ...te_a_new_dashboard_with_iframe_widget.yaml | 37 ++++ ...e_a_new_dashboard_with_image_widget.freeze | 1 + ...ate_a_new_dashboard_with_image_widget.yaml | 37 ++++ ...ew_dashboard_with_log_stream_widget.freeze | 1 + ..._new_dashboard_with_log_stream_widget.yaml | 37 ++++ ...dashboard_with_manage_status_widget.freeze | 1 + ...w_dashboard_with_manage_status_widget.yaml | 37 ++++ ...te_a_new_dashboard_with_note_widget.freeze | 1 + ...eate_a_new_dashboard_with_note_widget.yaml | 38 ++++ ...w_dashboard_with_query_table_widget.freeze | 1 + ...new_dashboard_with_query_table_widget.yaml | 38 ++++ ...w_dashboard_with_query_value_widget.freeze | 1 + ...new_dashboard_with_query_value_widget.yaml | 37 ++++ ...w_dashboard_with_scatterplot_widget.freeze | 1 + ...new_dashboard_with_scatterplot_widget.yaml | 39 ++++ ...ew_dashboard_with_servicemap_widget.freeze | 1 + ..._new_dashboard_with_servicemap_widget.yaml | 37 ++++ ...ate_a_new_dashboard_with_slo_widget.freeze | 1 + ...reate_a_new_dashboard_with_slo_widget.yaml | 72 +++++++ ...a_new_dashboard_with_toplist_widget.freeze | 1 + ...e_a_new_dashboard_with_toplist_widget.yaml | 38 ++++ ...dashboard_with_trace_service_widget.freeze | 1 + ...w_dashboard_with_trace_service_widget.yaml | 38 ++++ .../scenarios/features/v1/dashboards.feature | 191 ++++++++++++++++++ .../alert_graph_widget.json | 33 +++ .../alert_value_widget.json | 32 +++ .../check_status_widget.json | 32 +++ .../event_stream_widget.json | 31 +++ .../event_timeline_widget.json | 30 +++ .../free_text_widget.json | 29 +++ .../geomap_widget.json | 77 +++++++ .../heatmap_widget.json | 39 ++++ .../hostmap_widget.json | 40 ++++ .../iframe_widget.json | 26 +++ .../dashboards_json_payload/image_widget.json | 27 +++ .../log_stream_widget.json | 43 ++++ .../manage_status_widget.json | 34 ++++ .../dashboards_json_payload/note_widget.json | 26 +++ .../query_table_widget.json | 58 ++++++ .../query_value_widget.json | 46 +++++ .../scatterplot_widget.json | 77 +++++++ .../servicemap_widget.json | 33 +++ .../dashboards_json_payload/slo_widget.json | 35 ++++ .../toplist_widget.json | 53 +++++ .../trace_service_widget.json | 40 ++++ 86 files changed, 3295 insertions(+), 4 deletions(-) create mode 100644 examples/v1/dashboards/CreateDashboard_1177423752.go create mode 100644 examples/v1/dashboards/CreateDashboard_1200099236.go create mode 100644 examples/v1/dashboards/CreateDashboard_1213075383.go create mode 100644 examples/v1/dashboards/CreateDashboard_173805046.go create mode 100644 examples/v1/dashboards/CreateDashboard_1738608750.go create mode 100644 examples/v1/dashboards/CreateDashboard_2029850837.go create mode 100644 examples/v1/dashboards/CreateDashboard_2034634967.go create mode 100644 examples/v1/dashboards/CreateDashboard_2308247857.go create mode 100644 examples/v1/dashboards/CreateDashboard_2316374332.go create mode 100644 examples/v1/dashboards/CreateDashboard_2336428357.go create mode 100644 examples/v1/dashboards/CreateDashboard_2342457693.go create mode 100644 examples/v1/dashboards/CreateDashboard_2349863258.go create mode 100644 examples/v1/dashboards/CreateDashboard_2607944105.go create mode 100644 examples/v1/dashboards/CreateDashboard_2634813877.go create mode 100644 examples/v1/dashboards/CreateDashboard_2917274132.go create mode 100644 examples/v1/dashboards/CreateDashboard_2921337351.go create mode 100644 examples/v1/dashboards/CreateDashboard_3250131584.go create mode 100644 examples/v1/dashboards/CreateDashboard_417992286.go create mode 100644 examples/v1/dashboards/CreateDashboard_651038379.go create mode 100644 examples/v1/dashboards/CreateDashboard_913313564.go create mode 100644 examples/v1/dashboards/CreateDashboard_915214113.go create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.yaml create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.freeze create mode 100644 tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.yaml create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/alert_graph_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/alert_value_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/check_status_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/event_timeline_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/free_text_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/geomap_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/heatmap_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/hostmap_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/iframe_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/image_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/log_stream_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/note_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/query_table_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/query_value_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/scatterplot_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/servicemap_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/slo_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/toplist_widget.json create mode 100644 tests/scenarios/features/v1/dashboards_json_payload/trace_service_widget.json diff --git a/.apigentools-info b/.apigentools-info index 0359cbcfbbd..278727bd0ea 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2022-01-04 09:52:32.436445", - "spec_repo_commit": "184be3f" + "regenerated": "2022-01-04 14:44:52.038371", + "spec_repo_commit": "116ef08" }, "v2": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2022-01-04 09:52:32.454722", - "spec_repo_commit": "184be3f" + "regenerated": "2022-01-04 14:44:52.058365", + "spec_repo_commit": "116ef08" } } } \ No newline at end of file diff --git a/examples/v1/dashboards/CreateDashboard_1177423752.go b/examples/v1/dashboards/CreateDashboard_1177423752.go new file mode 100644 index 00000000000..d573171ef6e --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_1177423752.go @@ -0,0 +1,61 @@ +// Create a new dashboard with heatmap widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_heatmap_widget", + Description: *datadog.NewNullableString(nil), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 15, + }, + Definition: datadog.WidgetDefinition{ + HeatMapWidgetDefinition: &datadog.HeatMapWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Time: &datadog.WidgetTime{}, + Type: datadog.HEATMAPWIDGETDEFINITIONTYPE_HEATMAP, + Requests: []datadog.HeatMapWidgetRequest{ + { + Q: datadog.PtrString("avg:system.cpu.user{*} by {service}"), + Style: &datadog.WidgetStyle{ + Palette: datadog.PtrString("dog_classic"), + }, + }, + }, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_1200099236.go b/examples/v1/dashboards/CreateDashboard_1200099236.go new file mode 100644 index 00000000000..c8e1847a166 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_1200099236.go @@ -0,0 +1,64 @@ +// Create a new dashboard with hostmap widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_hostmap_widget", + Description: *datadog.NewNullableString(nil), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 22, + }, + Definition: datadog.WidgetDefinition{ + HostMapWidgetDefinition: &datadog.HostMapWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.HOSTMAPWIDGETDEFINITIONTYPE_HOSTMAP, + Requests: datadog.HostMapWidgetDefinitionRequests{ + Fill: &datadog.HostMapRequest{ + Q: datadog.PtrString("avg:system.cpu.user{*} by {host}"), + }, + }, + NodeType: datadog.WIDGETNODETYPE_HOST.Ptr(), + NoMetricHosts: datadog.PtrBool(true), + NoGroupHosts: datadog.PtrBool(true), + Style: &datadog.HostMapWidgetDefinitionStyle{ + Palette: datadog.PtrString("green_to_orange"), + PaletteFlip: datadog.PtrBool(false), + }, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_1213075383.go b/examples/v1/dashboards/CreateDashboard_1213075383.go new file mode 100644 index 00000000000..0626af07d36 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_1213075383.go @@ -0,0 +1,76 @@ +// Create a new dashboard with toplist widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_toplist_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 15, + }, + Definition: datadog.WidgetDefinition{ + ToplistWidgetDefinition: &datadog.ToplistWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Time: &datadog.WidgetTime{}, + Type: datadog.TOPLISTWIDGETDEFINITIONTYPE_TOPLIST, + Requests: []datadog.ToplistWidgetRequest{ + { + Queries: &[]datadog.FormulaAndFunctionQueryDefinition{ + datadog.FormulaAndFunctionQueryDefinition{ + FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{ + DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS, + Name: "query1", + Query: "avg:system.cpu.user{*} by {service}", + Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_AVG.Ptr(), + }}, + }, + Formulas: &[]datadog.WidgetFormula{ + { + Formula: "query1", + Limit: &datadog.WidgetFormulaLimit{ + Count: datadog.PtrInt64(10), + Order: datadog.QUERYSORTORDER_DESC.Ptr(), + }, + }, + }, + ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(), + }, + }, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_173805046.go b/examples/v1/dashboards/CreateDashboard_173805046.go new file mode 100644 index 00000000000..eef66121f3d --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_173805046.go @@ -0,0 +1,62 @@ +// Create a new dashboard with slo widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + // there is a valid "slo" in the system + SloData0ID := os.Getenv("SLO_DATA_0_ID") + + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_slo_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 60, + Height: 21, + }, + Definition: datadog.WidgetDefinition{ + SLOWidgetDefinition: &datadog.SLOWidgetDefinition{ + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.SLOWIDGETDEFINITIONTYPE_SLO, + ViewType: "detail", + TimeWindows: &[]datadog.WidgetTimeWindows{ + datadog.WIDGETTIMEWINDOWS_SEVEN_DAYS, + }, + SloId: datadog.PtrString(SloData0ID), + ShowErrorBudget: datadog.PtrBool(true), + ViewMode: datadog.WIDGETVIEWMODE_OVERALL.Ptr(), + GlobalTimeTarget: datadog.PtrString("0"), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_1738608750.go b/examples/v1/dashboards/CreateDashboard_1738608750.go new file mode 100644 index 00000000000..0abd333f2b3 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_1738608750.go @@ -0,0 +1,53 @@ +// Create a new dashboard with free_text widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_free_text_widget", + Description: *datadog.NewNullableString(nil), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 24, + Height: 6, + }, + Definition: datadog.WidgetDefinition{ + FreeTextWidgetDefinition: &datadog.FreeTextWidgetDefinition{ + Type: datadog.FREETEXTWIDGETDEFINITIONTYPE_FREE_TEXT, + Text: "Example free text", + Color: datadog.PtrString("#4d4d4d"), + FontSize: datadog.PtrString("auto"), + TextAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2029850837.go b/examples/v1/dashboards/CreateDashboard_2029850837.go new file mode 100644 index 00000000000..c9322cd7ecc --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2029850837.go @@ -0,0 +1,67 @@ +// Create a new dashboard with log_stream widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_log_stream_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 36, + }, + Definition: datadog.WidgetDefinition{ + LogStreamWidgetDefinition: &datadog.LogStreamWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.LOGSTREAMWIDGETDEFINITIONTYPE_LOG_STREAM, + Indexes: &[]string{ + "main", + }, + Query: datadog.PtrString(""), + Sort: &datadog.WidgetFieldSort{ + Column: "time", + Order: datadog.WIDGETSORT_DESCENDING, + }, + Columns: &[]string{ + "host", + "service", + }, + ShowDateColumn: datadog.PtrBool(true), + ShowMessageColumn: datadog.PtrBool(true), + MessageDisplay: datadog.WIDGETMESSAGEDISPLAY_EXPANDED_MEDIUM.Ptr(), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2034634967.go b/examples/v1/dashboards/CreateDashboard_2034634967.go new file mode 100644 index 00000000000..a90b434e753 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2034634967.go @@ -0,0 +1,57 @@ +// Create a new dashboard with servicemap widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_servicemap_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 15, + }, + Definition: datadog.WidgetDefinition{ + ServiceMapWidgetDefinition: &datadog.ServiceMapWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.SERVICEMAPWIDGETDEFINITIONTYPE_SERVICEMAP, + Service: "", + Filters: []string{ + "env:none", + "environment:*", + }, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2308247857.go b/examples/v1/dashboards/CreateDashboard_2308247857.go new file mode 100644 index 00000000000..a997ca33764 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2308247857.go @@ -0,0 +1,57 @@ +// Create a new dashboard with alert_graph widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + // there is a valid "monitor" in the system + + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_alert_graph_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 15, + }, + Definition: datadog.WidgetDefinition{ + AlertGraphWidgetDefinition: &datadog.AlertGraphWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Time: &datadog.WidgetTime{}, + Type: datadog.ALERTGRAPHWIDGETDEFINITIONTYPE_ALERT_GRAPH, + AlertId: "1", + VizType: datadog.WIDGETVIZTYPE_TIMESERIES, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2316374332.go b/examples/v1/dashboards/CreateDashboard_2316374332.go new file mode 100644 index 00000000000..3119644f0b9 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2316374332.go @@ -0,0 +1,58 @@ +// Create a new dashboard with alert_value widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + // there is a valid "monitor" in the system + + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_alert_value_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 15, + Height: 8, + }, + Definition: datadog.WidgetDefinition{ + AlertValueWidgetDefinition: &datadog.AlertValueWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.ALERTVALUEWIDGETDEFINITIONTYPE_ALERT_VALUE, + AlertId: "1", + Unit: datadog.PtrString("auto"), + TextAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Precision: datadog.PtrInt64(2), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2336428357.go b/examples/v1/dashboards/CreateDashboard_2336428357.go new file mode 100644 index 00000000000..a5326561310 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2336428357.go @@ -0,0 +1,79 @@ +// Create a new dashboard with query_table widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_query_table_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 54, + Height: 32, + }, + Definition: datadog.WidgetDefinition{ + TableWidgetDefinition: &datadog.TableWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Time: &datadog.WidgetTime{}, + Type: datadog.TABLEWIDGETDEFINITIONTYPE_QUERY_TABLE, + Requests: []datadog.TableWidgetRequest{ + { + Queries: &[]datadog.FormulaAndFunctionQueryDefinition{ + datadog.FormulaAndFunctionQueryDefinition{ + FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{ + DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS, + Name: "query1", + Query: "avg:system.cpu.user{*} by {host}", + Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_AVG.Ptr(), + }}, + }, + Formulas: &[]datadog.WidgetFormula{ + { + Formula: "query1", + Limit: &datadog.WidgetFormulaLimit{ + Count: datadog.PtrInt64(500), + Order: datadog.QUERYSORTORDER_DESC.Ptr(), + }, + ConditionalFormats: &[]datadog.WidgetConditionalFormat{}, + CellDisplayMode: datadog.TABLEWIDGETCELLDISPLAYMODE_BAR.Ptr(), + }, + }, + ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(), + }, + }, + HasSearchBar: datadog.TABLEWIDGETHASSEARCHBAR_AUTO.Ptr(), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2342457693.go b/examples/v1/dashboards/CreateDashboard_2342457693.go new file mode 100644 index 00000000000..08a4b52f6da --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2342457693.go @@ -0,0 +1,99 @@ +// Create a new dashboard with scatterplot widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_scatterplot_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 15, + }, + Definition: datadog.WidgetDefinition{ + ScatterPlotWidgetDefinition: &datadog.ScatterPlotWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Time: &datadog.WidgetTime{}, + Type: datadog.SCATTERPLOTWIDGETDEFINITIONTYPE_SCATTERPLOT, + Requests: datadog.ScatterPlotWidgetDefinitionRequests{ + Table: &datadog.ScatterplotTableRequest{ + Formulas: &[]datadog.ScatterplotWidgetFormula{ + { + Formula: "query1", + Dimension: datadog.SCATTERPLOTDIMENSION_X, + Alias: datadog.PtrString(""), + }, + { + Formula: "query2", + Dimension: datadog.SCATTERPLOTDIMENSION_Y, + Alias: datadog.PtrString(""), + }, + }, + Queries: &[]datadog.FormulaAndFunctionQueryDefinition{ + datadog.FormulaAndFunctionQueryDefinition{ + FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{ + DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS, + Name: "query1", + Query: "avg:system.cpu.user{*} by {service}", + Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_AVG.Ptr(), + }}, + datadog.FormulaAndFunctionQueryDefinition{ + FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{ + DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS, + Name: "query2", + Query: "avg:system.mem.used{*} by {service}", + Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_AVG.Ptr(), + }}, + }, + ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(), + }, + }, + Xaxis: &datadog.WidgetAxis{ + Scale: datadog.PtrString("linear"), + IncludeZero: datadog.PtrBool(true), + Min: datadog.PtrString("auto"), + Max: datadog.PtrString("auto"), + }, + Yaxis: &datadog.WidgetAxis{ + Scale: datadog.PtrString("linear"), + IncludeZero: datadog.PtrBool(true), + Min: datadog.PtrString("auto"), + Max: datadog.PtrString("auto"), + }, + ColorByGroups: &[]string{}, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2349863258.go b/examples/v1/dashboards/CreateDashboard_2349863258.go new file mode 100644 index 00000000000..831ed40f410 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2349863258.go @@ -0,0 +1,69 @@ +// Create a new dashboard with query_value widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_query_value_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 15, + }, + Definition: datadog.WidgetDefinition{ + QueryValueWidgetDefinition: &datadog.QueryValueWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Time: &datadog.WidgetTime{}, + Type: datadog.QUERYVALUEWIDGETDEFINITIONTYPE_QUERY_VALUE, + Requests: []datadog.QueryValueWidgetRequest{ + { + ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(), + Queries: &[]datadog.FormulaAndFunctionQueryDefinition{ + datadog.FormulaAndFunctionQueryDefinition{ + FormulaAndFunctionMetricQueryDefinition: &datadog.FormulaAndFunctionMetricQueryDefinition{ + Name: "query1", + DataSource: datadog.FORMULAANDFUNCTIONMETRICDATASOURCE_METRICS, + Query: "avg:system.cpu.user{*}", + Aggregator: datadog.FORMULAANDFUNCTIONMETRICAGGREGATION_AVG.Ptr(), + }}, + }, + }, + }, + Autoscale: datadog.PtrBool(true), + Precision: datadog.PtrInt64(2), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2607944105.go b/examples/v1/dashboards/CreateDashboard_2607944105.go new file mode 100644 index 00000000000..089310614da --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2607944105.go @@ -0,0 +1,56 @@ +// Create a new dashboard with check_status widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_check_status_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 15, + Height: 8, + }, + Definition: datadog.WidgetDefinition{ + CheckStatusWidgetDefinition: &datadog.CheckStatusWidgetDefinition{ + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.CHECKSTATUSWIDGETDEFINITIONTYPE_CHECK_STATUS, + Check: "datadog.agent.up", + Grouping: datadog.WIDGETGROUPING_CHECK, + Tags: &[]string{ + "*", + }, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2634813877.go b/examples/v1/dashboards/CreateDashboard_2634813877.go new file mode 100644 index 00000000000..c2be647e173 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2634813877.go @@ -0,0 +1,55 @@ +// Create a new dashboard with event_stream widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_event_stream_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 38, + }, + Definition: datadog.WidgetDefinition{ + EventStreamWidgetDefinition: &datadog.EventStreamWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.EVENTSTREAMWIDGETDEFINITIONTYPE_EVENT_STREAM, + Query: "example-query", + TagsExecution: datadog.PtrString("and"), + EventSize: datadog.WIDGETEVENTSIZE_SMALL.Ptr(), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2917274132.go b/examples/v1/dashboards/CreateDashboard_2917274132.go new file mode 100644 index 00000000000..9b31c658306 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2917274132.go @@ -0,0 +1,58 @@ +// Create a new dashboard with manage_status widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_manage_status_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 50, + Height: 25, + }, + Definition: datadog.WidgetDefinition{ + MonitorSummaryWidgetDefinition: &datadog.MonitorSummaryWidgetDefinition{ + Type: datadog.MONITORSUMMARYWIDGETDEFINITIONTYPE_MANAGE_STATUS, + SummaryType: datadog.WIDGETSUMMARYTYPE_MONITORS.Ptr(), + DisplayFormat: datadog.WIDGETMONITORSUMMARYDISPLAYFORMAT_COUNTS_AND_LIST.Ptr(), + ColorPreference: datadog.WIDGETCOLORPREFERENCE_TEXT.Ptr(), + HideZeroCounts: datadog.PtrBool(true), + ShowLastTriggered: datadog.PtrBool(false), + Query: "", + Sort: datadog.WIDGETMONITORSUMMARYSORT_STATUS_ASCENDING.Ptr(), + Count: datadog.PtrInt64(50), + Start: datadog.PtrInt64(0), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_2921337351.go b/examples/v1/dashboards/CreateDashboard_2921337351.go new file mode 100644 index 00000000000..1de050a2323 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2921337351.go @@ -0,0 +1,62 @@ +// Create a new dashboard with trace_service widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_trace_service_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 72, + Height: 72, + }, + Definition: datadog.WidgetDefinition{ + ServiceSummaryWidgetDefinition: &datadog.ServiceSummaryWidgetDefinition{ + Title: datadog.PtrString("Service Summary"), + Time: &datadog.WidgetTime{}, + Type: datadog.SERVICESUMMARYWIDGETDEFINITIONTYPE_TRACE_SERVICE, + Env: "none", + Service: "", + SpanName: "", + ShowHits: datadog.PtrBool(true), + ShowErrors: datadog.PtrBool(true), + ShowLatency: datadog.PtrBool(true), + ShowBreakdown: datadog.PtrBool(true), + ShowDistribution: datadog.PtrBool(true), + ShowResourceList: datadog.PtrBool(false), + SizeFormat: datadog.WIDGETSIZEFORMAT_MEDIUM.Ptr(), + DisplayFormat: datadog.WIDGETSERVICESUMMARYDISPLAYFORMAT_TWO_COLUMN.Ptr(), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_3250131584.go b/examples/v1/dashboards/CreateDashboard_3250131584.go new file mode 100644 index 00000000000..ff0eec3a52c --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_3250131584.go @@ -0,0 +1,54 @@ +// Create a new dashboard with event_timeline widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_event_timeline_widget", + Description: *datadog.NewNullableString(nil), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 9, + }, + Definition: datadog.WidgetDefinition{ + EventTimelineWidgetDefinition: &datadog.EventTimelineWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Type: datadog.EVENTTIMELINEWIDGETDEFINITIONTYPE_EVENT_TIMELINE, + Query: "status:error priority:all", + TagsExecution: datadog.PtrString("and"), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_417992286.go b/examples/v1/dashboards/CreateDashboard_417992286.go new file mode 100644 index 00000000000..95c617433d1 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_417992286.go @@ -0,0 +1,50 @@ +// Create a new dashboard with note widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_note_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 18, + Height: 24, + }, + Definition: datadog.WidgetDefinition{ + NoteWidgetDefinition: &datadog.NoteWidgetDefinition{ + Type: datadog.NOTEWIDGETDEFINITIONTYPE_NOTE, + Content: "# Example Note", + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_651038379.go b/examples/v1/dashboards/CreateDashboard_651038379.go new file mode 100644 index 00000000000..150ffbc3b74 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_651038379.go @@ -0,0 +1,51 @@ +// Create a new dashboard with image widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_image_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 12, + Height: 12, + }, + Definition: datadog.WidgetDefinition{ + ImageWidgetDefinition: &datadog.ImageWidgetDefinition{ + Type: datadog.IMAGEWIDGETDEFINITIONTYPE_IMAGE, + Url: "https://example.com/image.png", + Sizing: datadog.WIDGETIMAGESIZING_COVER.Ptr(), + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_913313564.go b/examples/v1/dashboards/CreateDashboard_913313564.go new file mode 100644 index 00000000000..b2b35c61c9e --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_913313564.go @@ -0,0 +1,50 @@ +// Create a new dashboard with iframe widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_iframe_widget", + Description: *datadog.NewNullableString(datadog.PtrString("")), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 12, + Height: 12, + }, + Definition: datadog.WidgetDefinition{ + IFrameWidgetDefinition: &datadog.IFrameWidgetDefinition{ + Type: datadog.IFRAMEWIDGETDEFINITIONTYPE_IFRAME, + Url: "https://docs.datadoghq.com/api/latest/", + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/examples/v1/dashboards/CreateDashboard_915214113.go b/examples/v1/dashboards/CreateDashboard_915214113.go new file mode 100644 index 00000000000..7b658f845d0 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_915214113.go @@ -0,0 +1,100 @@ +// Create a new dashboard with geomap widget + +package main + +import ( + "context" + "encoding/json" + "fmt" + "os" + + datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog" +) + +func main() { + body := datadog.Dashboard{ + Title: "Example-Create_a_new_dashboard_with_geomap_widget", + Description: *datadog.NewNullableString(nil), + Widgets: []datadog.Widget{ + { + Layout: &datadog.WidgetLayout{ + X: 0, + Y: 0, + Width: 47, + Height: 30, + }, + Definition: datadog.WidgetDefinition{ + GeomapWidgetDefinition: &datadog.GeomapWidgetDefinition{ + Title: datadog.PtrString(""), + TitleSize: datadog.PtrString("16"), + TitleAlign: datadog.WIDGETTEXTALIGN_LEFT.Ptr(), + Time: &datadog.WidgetTime{}, + Type: datadog.GEOMAPWIDGETDEFINITIONTYPE_GEOMAP, + Requests: []datadog.GeomapWidgetRequest{ + { + Formulas: &[]datadog.WidgetFormula{ + { + Formula: "query1", + Limit: &datadog.WidgetFormulaLimit{ + Count: datadog.PtrInt64(250), + Order: datadog.QUERYSORTORDER_DESC.Ptr(), + }, + }, + }, + Queries: &[]datadog.FormulaAndFunctionQueryDefinition{ + datadog.FormulaAndFunctionQueryDefinition{ + FormulaAndFunctionEventQueryDefinition: &datadog.FormulaAndFunctionEventQueryDefinition{ + Name: "query1", + DataSource: datadog.FORMULAANDFUNCTIONEVENTSDATASOURCE_RUM, + Search: &datadog.FormulaAndFunctionEventQueryDefinitionSearch{ + Query: "", + }, + Indexes: &[]string{ + "*", + }, + Compute: datadog.FormulaAndFunctionEventQueryDefinitionCompute{ + Aggregation: datadog.FORMULAANDFUNCTIONEVENTAGGREGATION_COUNT, + }, + GroupBy: &[]datadog.FormulaAndFunctionEventQueryGroupBy{ + { + Facet: "@geo.country_iso_code", + Limit: datadog.PtrInt64(250), + Sort: &datadog.FormulaAndFunctionEventQueryGroupBySort{ + Order: datadog.QUERYSORTORDER_DESC.Ptr(), + Aggregation: datadog.FORMULAANDFUNCTIONEVENTAGGREGATION_COUNT, + }, + }, + }, + }}, + }, + ResponseFormat: datadog.FORMULAANDFUNCTIONRESPONSEFORMAT_SCALAR.Ptr(), + }, + }, + Style: datadog.GeomapWidgetDefinitionStyle{ + Palette: "hostmap_blues", + PaletteFlip: false, + }, + View: datadog.GeomapWidgetDefinitionView{ + Focus: "WORLD", + }, + }}, + }, + }, + TemplateVariables: []datadog.DashboardTemplateVariable{}, + LayoutType: datadog.DASHBOARDLAYOUTTYPE_FREE, + IsReadOnly: datadog.PtrBool(false), + NotifyList: []string{}, + } + ctx := datadog.NewDefaultContext(context.Background()) + configuration := datadog.NewConfiguration() + apiClient := datadog.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(ctx, body) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard`: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + + responseContent, _ := json.MarshalIndent(resp, "", " ") + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`:\n%s\n", responseContent) +} diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.freeze new file mode 100644 index 00000000000..b2c9cf01eaf --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:31:28.469Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.yaml new file mode 100644 index 00000000000..adb985e8209 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_graph_widget.yaml @@ -0,0 +1,76 @@ +interactions: +- request: + body: | + {"message":"some message Notify: @hipchat-channel","name":"Test-Create_a_new_dashboard_with_alert_graph_widget-1640284288","options":{"enable_logs_sample":true,"escalation_message":"the situation has escalated","evaluation_delay":700,"groupby_simple_monitor":true,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notify_audit":false,"notify_no_data":false,"renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") \u003e 2","tags":["test:testcreateanewdashboardwithalertgraphwidget1640284288","env:ci"],"type":"log alert"} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/monitor + response: + body: '{"restricted_roles":null,"tags":["test:testcreateanewdashboardwithalertgraphwidget1640284288","env:ci"],"deleted":null,"query":"logs(\"service:foo + AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") + > 2","message":"some message Notify: @hipchat-channel","id":58748089,"multi":true,"name":"Test-Create_a_new_dashboard_with_alert_graph_widget-1640284288","created":"2021-12-23T18:31:28.814099+00:00","created_at":1640284288000,"creator":{"id":1445416,"handle":"frog@datadoghq.com","name":null,"email":"frog@datadoghq.com"},"org_id":321813,"modified":"2021-12-23T18:31:28.814099+00:00","priority":3,"overall_state_modified":null,"overall_state":"No + Data","type":"log alert","options":{"notify_audit":false,"locked":false,"timeout_h":24,"renotify_interval":60,"include_tags":true,"no_data_timeframe":null,"silenced":{},"new_host_delay":600,"require_full_window":true,"notify_no_data":false,"enable_logs_sample":true,"groupby_simple_monitor":true,"escalation_message":"the + situation has escalated","evaluation_delay":700,"thresholds":{"critical":2.0,"warning":1.0}}}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_alert_graph_widget-1640284288","widgets":[{"definition":{"alert_id":"58748089","time":{},"title":"","title_align":"left","title_size":"16","type":"alert_graph","viz_type":"timeseries"},"layout":{"height":15,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"cz2-pvv-25h","title":"Test-Create_a_new_dashboard_with_alert_graph_widget-1640284288","url":"/dashboard/cz2-pvv-25h/test-createanewdashboardwithalertgraphwidget-1640284288","created_at":"2021-12-23T18:31:28.995402+00:00","modified_at":"2021-12-23T18:31:28.995402+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","viz_type":"timeseries","title":"","title_align":"left","alert_id":"58748089","time":{},"type":"alert_graph"},"layout":{"y":0,"width":47,"x":0,"height":15},"id":269431710456897}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/cz2-pvv-25h + response: + body: '{"deleted_dashboard_id":"cz2-pvv-25h"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/monitor/58748089 + response: + body: '{"deleted_monitor_id":58748089}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.freeze new file mode 100644 index 00000000000..f9134f15cf2 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:00.563Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.yaml new file mode 100644 index 00000000000..6bc5c51b0db --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_alert_value_widget.yaml @@ -0,0 +1,76 @@ +interactions: +- request: + body: | + {"message":"some message Notify: @hipchat-channel","name":"Test-Create_a_new_dashboard_with_alert_value_widget-1640210580","options":{"enable_logs_sample":true,"escalation_message":"the situation has escalated","evaluation_delay":700,"groupby_simple_monitor":true,"include_tags":true,"locked":false,"new_host_delay":600,"no_data_timeframe":null,"notify_audit":false,"notify_no_data":false,"renotify_interval":60,"require_full_window":true,"thresholds":{"critical":2,"warning":1},"timeout_h":24},"priority":3,"query":"logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") \u003e 2","tags":["test:testcreateanewdashboardwithalertvaluewidget1640210580","env:ci"],"type":"log alert"} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/monitor + response: + body: '{"restricted_roles":null,"tags":["test:testcreateanewdashboardwithalertvaluewidget1640210580","env:ci"],"deleted":null,"query":"logs(\"service:foo + AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") + > 2","message":"some message Notify: @hipchat-channel","id":58703572,"multi":true,"name":"Test-Create_a_new_dashboard_with_alert_value_widget-1640210580","created":"2021-12-22T22:03:00.829986+00:00","created_at":1640210580000,"creator":{"id":1445416,"handle":"frog@datadoghq.com","name":null,"email":"frog@datadoghq.com"},"org_id":321813,"modified":"2021-12-22T22:03:00.829986+00:00","priority":3,"overall_state_modified":null,"overall_state":"No + Data","type":"log alert","options":{"notify_audit":false,"locked":false,"timeout_h":24,"renotify_interval":60,"include_tags":true,"no_data_timeframe":null,"silenced":{},"new_host_delay":600,"require_full_window":true,"notify_no_data":false,"enable_logs_sample":true,"groupby_simple_monitor":true,"escalation_message":"the + situation has escalated","evaluation_delay":700,"thresholds":{"critical":2.0,"warning":1.0}}}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_alert_value_widget-1640210580","widgets":[{"definition":{"alert_id":"58703572","precision":2,"text_align":"left","title":"","title_align":"left","title_size":"16","type":"alert_value","unit":"auto"},"layout":{"height":8,"width":15,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"2pp-b2g-z5e","title":"Test-Create_a_new_dashboard_with_alert_value_widget-1640210580","url":"/dashboard/2pp-b2g-z5e/test-createanewdashboardwithalertvaluewidget-1640210580","created_at":"2021-12-22T22:03:01.047986+00:00","modified_at":"2021-12-22T22:03:01.047986+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","text_align":"left","precision":2,"alert_id":"58703572","type":"alert_value","unit":"auto"},"layout":{"y":0,"width":15,"x":0,"height":8},"id":5712653184038328}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/2pp-b2g-z5e + response: + body: '{"deleted_dashboard_id":"2pp-b2g-z5e"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/monitor/58703572 + response: + body: '{"deleted_monitor_id":58703572}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.freeze new file mode 100644 index 00000000000..37293aeb77c --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:01.661Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.yaml new file mode 100644 index 00000000000..61aaf08c29e --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_check_status_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_check_status_widget-1640210581","widgets":[{"definition":{"check":"datadog.agent.up","grouping":"check","tags":["*"],"title_align":"left","title_size":"16","type":"check_status"},"layout":{"height":8,"width":15,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"npg-g5b-7iz","title":"Test-Create_a_new_dashboard_with_check_status_widget-1640210581","url":"/dashboard/npg-g5b-7iz/test-createanewdashboardwithcheckstatuswidget-1640210581","created_at":"2021-12-22T22:03:01.835329+00:00","modified_at":"2021-12-22T22:03:01.835329+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","tags":["*"],"title_align":"left","type":"check_status","check":"datadog.agent.up","grouping":"check"},"layout":{"y":0,"width":15,"x":0,"height":8},"id":7745352999159719}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/npg-g5b-7iz + response: + body: '{"deleted_dashboard_id":"npg-g5b-7iz"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze new file mode 100644 index 00000000000..7d7bfd791f7 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:40:16.352Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml new file mode 100644 index 00000000000..de15c5f6550 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_stream_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_event_stream_widget-1640284816","widgets":[{"definition":{"event_size":"s","query":"example-query","tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_stream"},"layout":{"height":38,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"bgh-urb-hxs","title":"Test-Create_a_new_dashboard_with_event_stream_widget-1640284816","url":"/dashboard/bgh-urb-hxs/test-createanewdashboardwitheventstreamwidget-1640284816","created_at":"2021-12-23T18:40:16.583000+00:00","modified_at":"2021-12-23T18:40:16.583000+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","tags_execution":"and","query":"example-query","type":"event_stream","event_size":"s"},"layout":{"y":0,"width":47,"x":0,"height":38},"id":297821549837389}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/bgh-urb-hxs + response: + body: '{"deleted_dashboard_id":"bgh-urb-hxs"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.freeze new file mode 100644 index 00000000000..8f66344e2b1 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:54:25.254Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.yaml new file mode 100644 index 00000000000..314a39c5e6a --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_event_timeline_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":null,"is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_event_timeline_widget-1640285665","widgets":[{"definition":{"query":"status:error priority:all","tags_execution":"and","title":"","title_align":"left","title_size":"16","type":"event_timeline"},"layout":{"height":9,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":null,"restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"d59-ueh-uib","title":"Test-Create_a_new_dashboard_with_event_timeline_widget-1640285665","url":"/dashboard/d59-ueh-uib/test-createanewdashboardwitheventtimelinewidget-1640285665","created_at":"2021-12-23T18:54:25.535080+00:00","modified_at":"2021-12-23T18:54:25.535080+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","tags_execution":"and","query":"status:error + priority:all","type":"event_timeline"},"layout":{"y":0,"width":47,"x":0,"height":9},"id":1013453064093939}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/d59-ueh-uib + response: + body: '{"deleted_dashboard_id":"d59-ueh-uib"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.freeze new file mode 100644 index 00000000000..2899090d18e --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:40:16.816Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.yaml new file mode 100644 index 00000000000..878f19e5152 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_free_text_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":null,"is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_free_text_widget-1640284816","widgets":[{"definition":{"color":"#4d4d4d","font_size":"auto","text":"Example free text","text_align":"left","type":"free_text"},"layout":{"height":6,"width":24,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":null,"restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"dz4-c6g-zhv","title":"Test-Create_a_new_dashboard_with_free_text_widget-1640284816","url":"/dashboard/dz4-c6g-zhv/test-createanewdashboardwithfreetextwidget-1640284816","created_at":"2021-12-23T18:40:16.965728+00:00","modified_at":"2021-12-23T18:40:16.965728+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"color":"#4d4d4d","text":"Example + free text","font_size":"auto","text_align":"left","type":"free_text"},"layout":{"y":0,"width":24,"x":0,"height":6},"id":3879962790815938}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/dz4-c6g-zhv + response: + body: '{"deleted_dashboard_id":"dz4-c6g-zhv"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.freeze new file mode 100644 index 00000000000..9a405f460bf --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:40:17.237Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.yaml new file mode 100644 index 00000000000..bc7c3d90604 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_geomap_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":null,"is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_geomap_widget-1640284817","widgets":[{"definition":{"requests":[{"formulas":[{"formula":"query1","limit":{"count":250,"order":"desc"}}],"queries":[{"compute":{"aggregation":"count"},"data_source":"rum","group_by":[{"facet":"@geo.country_iso_code","limit":250,"sort":{"aggregation":"count","order":"desc"}}],"indexes":["*"],"name":"query1","search":{"query":""}}],"response_format":"scalar"}],"style":{"palette":"hostmap_blues","palette_flip":false},"time":{},"title":"","title_align":"left","title_size":"16","type":"geomap","view":{"focus":"WORLD"}},"layout":{"height":30,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":null,"restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"tg2-5sr-akj","title":"Test-Create_a_new_dashboard_with_geomap_widget-1640284817","url":"/dashboard/tg2-5sr-akj/test-createanewdashboardwithgeomapwidget-1640284817","created_at":"2021-12-23T18:40:17.414376+00:00","modified_at":"2021-12-23T18:40:17.414376+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"style":{"palette":"hostmap_blues","palette_flip":false},"title_size":"16","title":"","title_align":"left","time":{},"requests":[{"formulas":[{"formula":"query1","limit":{"count":250,"order":"desc"}}],"response_format":"scalar","queries":[{"search":{"query":""},"data_source":"rum","compute":{"aggregation":"count"},"name":"query1","indexes":["*"],"group_by":[{"facet":"@geo.country_iso_code","sort":{"aggregation":"count","order":"desc"},"limit":250}]}]}],"type":"geomap","view":{"focus":"WORLD"}},"layout":{"y":0,"width":47,"x":0,"height":30},"id":6164508113410427}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/tg2-5sr-akj + response: + body: '{"deleted_dashboard_id":"tg2-5sr-akj"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.freeze new file mode 100644 index 00000000000..e390f040e7b --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:54:25.781Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.yaml new file mode 100644 index 00000000000..be22919e81c --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_heatmap_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":null,"is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_heatmap_widget-1640285665","widgets":[{"definition":{"requests":[{"q":"avg:system.cpu.user{*} by {service}","style":{"palette":"dog_classic"}}],"time":{},"title":"","title_align":"left","title_size":"16","type":"heatmap"},"layout":{"height":15,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":null,"restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"2fk-qp2-zas","title":"Test-Create_a_new_dashboard_with_heatmap_widget-1640285665","url":"/dashboard/2fk-qp2-zas/test-createanewdashboardwithheatmapwidget-1640285665","created_at":"2021-12-23T18:54:25.953408+00:00","modified_at":"2021-12-23T18:54:25.953408+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","time":{},"requests":[{"q":"avg:system.cpu.user{*} + by {service}","style":{"palette":"dog_classic"}}],"type":"heatmap"},"layout":{"y":0,"width":47,"x":0,"height":15},"id":5668298460599358}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/2fk-qp2-zas + response: + body: '{"deleted_dashboard_id":"2fk-qp2-zas"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.freeze new file mode 100644 index 00000000000..e044b265240 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:05.256Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.yaml new file mode 100644 index 00000000000..860c0e32ebe --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_hostmap_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":null,"is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_hostmap_widget-1640210585","widgets":[{"definition":{"no_group_hosts":true,"no_metric_hosts":true,"node_type":"host","requests":{"fill":{"q":"avg:system.cpu.user{*} by {host}"}},"style":{"palette":"green_to_orange","palette_flip":false},"title":"","title_align":"left","title_size":"16","type":"hostmap"},"layout":{"height":22,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":null,"restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"by2-vuz-t8y","title":"Test-Create_a_new_dashboard_with_hostmap_widget-1640210585","url":"/dashboard/by2-vuz-t8y/test-createanewdashboardwithhostmapwidget-1640210585","created_at":"2021-12-22T22:03:05.469185+00:00","modified_at":"2021-12-22T22:03:05.469185+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"style":{"palette":"green_to_orange","palette_flip":false},"title_size":"16","title":"","title_align":"left","node_type":"host","no_metric_hosts":true,"requests":{"fill":{"q":"avg:system.cpu.user{*} + by {host}"}},"no_group_hosts":true,"type":"hostmap"},"layout":{"y":0,"width":47,"x":0,"height":22},"id":8057528088647954}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/by2-vuz-t8y + response: + body: '{"deleted_dashboard_id":"by2-vuz-t8y"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.freeze new file mode 100644 index 00000000000..da9892b09e2 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:05.792Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.yaml new file mode 100644 index 00000000000..fa9780789c0 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_iframe_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_iframe_widget-1640210585","widgets":[{"definition":{"type":"iframe","url":"https://docs.datadoghq.com/api/latest/"},"layout":{"height":12,"width":12,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"uik-kyz-xi4","title":"Test-Create_a_new_dashboard_with_iframe_widget-1640210585","url":"/dashboard/uik-kyz-xi4/test-createanewdashboardwithiframewidget-1640210585","created_at":"2021-12-22T22:03:05.969306+00:00","modified_at":"2021-12-22T22:03:05.969306+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"url":"https://docs.datadoghq.com/api/latest/","type":"iframe"},"layout":{"y":0,"width":12,"x":0,"height":12},"id":2292796990276120}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/uik-kyz-xi4 + response: + body: '{"deleted_dashboard_id":"uik-kyz-xi4"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.freeze new file mode 100644 index 00000000000..0658f6237c7 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:06.383Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.yaml new file mode 100644 index 00000000000..8d7f4b488be --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_image_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_image_widget-1640210586","widgets":[{"definition":{"sizing":"cover","type":"image","url":"https://example.com/image.png"},"layout":{"height":12,"width":12,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"q5q-d8i-w29","title":"Test-Create_a_new_dashboard_with_image_widget-1640210586","url":"/dashboard/q5q-d8i-w29/test-createanewdashboardwithimagewidget-1640210586","created_at":"2021-12-22T22:03:06.569103+00:00","modified_at":"2021-12-22T22:03:06.569103+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"sizing":"cover","url":"https://example.com/image.png","type":"image"},"layout":{"y":0,"width":12,"x":0,"height":12},"id":3686752555034643}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/q5q-d8i-w29 + response: + body: '{"deleted_dashboard_id":"q5q-d8i-w29"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.freeze new file mode 100644 index 00000000000..ec940bc75f9 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:06.915Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.yaml new file mode 100644 index 00000000000..0a6f4484fdb --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_log_stream_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_log_stream_widget-1640210586","widgets":[{"definition":{"columns":["host","service"],"indexes":["main"],"message_display":"expanded-md","query":"","show_date_column":true,"show_message_column":true,"sort":{"column":"time","order":"desc"},"title":"","title_align":"left","title_size":"16","type":"log_stream"},"layout":{"height":36,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"det-m34-f8r","title":"Test-Create_a_new_dashboard_with_log_stream_widget-1640210586","url":"/dashboard/det-m34-f8r/test-createanewdashboardwithlogstreamwidget-1640210586","created_at":"2021-12-22T22:03:07.086905+00:00","modified_at":"2021-12-22T22:03:07.086905+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"sort":{"column":"time","order":"desc"},"show_message_column":true,"title_size":"16","title":"","title_align":"left","message_display":"expanded-md","indexes":["main"],"show_date_column":true,"query":"","type":"log_stream","columns":["host","service"]},"layout":{"y":0,"width":47,"x":0,"height":36},"id":122471264471299}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/det-m34-f8r + response: + body: '{"deleted_dashboard_id":"det-m34-f8r"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.freeze new file mode 100644 index 00000000000..f12f61a9329 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:07.433Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.yaml new file mode 100644 index 00000000000..2a729851cbf --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_manage_status_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_manage_status_widget-1640210587","widgets":[{"definition":{"color_preference":"text","count":50,"display_format":"countsAndList","hide_zero_counts":true,"query":"","show_last_triggered":false,"sort":"status,asc","start":0,"summary_type":"monitors","type":"manage_status"},"layout":{"height":25,"width":50,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"uu2-p6t-rbf","title":"Test-Create_a_new_dashboard_with_manage_status_widget-1640210587","url":"/dashboard/uu2-p6t-rbf/test-createanewdashboardwithmanagestatuswidget-1640210587","created_at":"2021-12-22T22:03:07.603756+00:00","modified_at":"2021-12-22T22:03:07.603756+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"count":50,"sort":"status,asc","color_preference":"text","hide_zero_counts":true,"start":0,"summary_type":"monitors","show_last_triggered":false,"query":"","display_format":"countsAndList","type":"manage_status"},"layout":{"y":0,"width":50,"x":0,"height":25},"id":5109716242551068}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/uu2-p6t-rbf + response: + body: '{"deleted_dashboard_id":"uu2-p6t-rbf"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.freeze new file mode 100644 index 00000000000..c1e286b6ef1 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.freeze @@ -0,0 +1 @@ +2021-12-23T19:13:09.065Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.yaml new file mode 100644 index 00000000000..54eeaa622f2 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_note_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_note_widget-1640286789","widgets":[{"definition":{"content":"# Example Note","type":"note"},"layout":{"height":24,"width":18,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"9c2-irq-xh9","title":"Test-Create_a_new_dashboard_with_note_widget-1640286789","url":"/dashboard/9c2-irq-xh9/test-createanewdashboardwithnotewidget-1640286789","created_at":"2021-12-23T19:13:09.313338+00:00","modified_at":"2021-12-23T19:13:09.313338+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"content":"# + Example Note","type":"note"},"layout":{"y":0,"width":18,"x":0,"height":24},"id":1328096231719907}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/9c2-irq-xh9 + response: + body: '{"deleted_dashboard_id":"9c2-irq-xh9"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.freeze new file mode 100644 index 00000000000..0fc92356b87 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:11.192Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.yaml new file mode 100644 index 00000000000..5d45c63c909 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_table_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_query_table_widget-1640210591","widgets":[{"definition":{"has_search_bar":"auto","requests":[{"formulas":[{"cell_display_mode":"bar","conditional_formats":[],"formula":"query1","limit":{"count":500,"order":"desc"}}],"queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} by {host}"}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"query_table"},"layout":{"height":32,"width":54,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"95x-aer-iuw","title":"Test-Create_a_new_dashboard_with_query_table_widget-1640210591","url":"/dashboard/95x-aer-iuw/test-createanewdashboardwithquerytablewidget-1640210591","created_at":"2021-12-22T22:03:11.401486+00:00","modified_at":"2021-12-22T22:03:11.401486+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","has_search_bar":"auto","time":{},"requests":[{"formulas":[{"formula":"query1","cell_display_mode":"bar","limit":{"count":500,"order":"desc"},"conditional_formats":[]}],"response_format":"scalar","queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} + by {host}"}]}],"type":"query_table"},"layout":{"y":0,"width":54,"x":0,"height":32},"id":883696987902791}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/95x-aer-iuw + response: + body: '{"deleted_dashboard_id":"95x-aer-iuw"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.freeze new file mode 100644 index 00000000000..d34b36bf248 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:08.368Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.yaml new file mode 100644 index 00000000000..d8c897ffa69 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_query_value_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_query_value_widget-1640210588","widgets":[{"definition":{"autoscale":true,"precision":2,"requests":[{"queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*}"}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"query_value"},"layout":{"height":15,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"irj-79k-nag","title":"Test-Create_a_new_dashboard_with_query_value_widget-1640210588","url":"/dashboard/irj-79k-nag/test-createanewdashboardwithqueryvaluewidget-1640210588","created_at":"2021-12-22T22:03:08.573458+00:00","modified_at":"2021-12-22T22:03:08.573458+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"autoscale":true,"title":"","title_align":"left","precision":2,"time":{},"title_size":"16","requests":[{"response_format":"scalar","queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*}"}]}],"type":"query_value"},"layout":{"y":0,"width":47,"x":0,"height":15},"id":732418221018875}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/irj-79k-nag + response: + body: '{"deleted_dashboard_id":"irj-79k-nag"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.freeze new file mode 100644 index 00000000000..675caa55e40 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:08.875Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.yaml new file mode 100644 index 00000000000..e1551138faa --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_scatterplot_widget.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_scatterplot_widget-1640210588","widgets":[{"definition":{"color_by_groups":[],"requests":{"table":{"formulas":[{"alias":"","dimension":"x","formula":"query1"},{"alias":"","dimension":"y","formula":"query2"}],"queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} by {service}"},{"aggregator":"avg","data_source":"metrics","name":"query2","query":"avg:system.mem.used{*} by {service}"}],"response_format":"scalar"}},"time":{},"title":"","title_align":"left","title_size":"16","type":"scatterplot","xaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"},"yaxis":{"include_zero":true,"max":"auto","min":"auto","scale":"linear"}},"layout":{"height":15,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"ghq-yyu-mg3","title":"Test-Create_a_new_dashboard_with_scatterplot_widget-1640210588","url":"/dashboard/ghq-yyu-mg3/test-createanewdashboardwithscatterplotwidget-1640210588","created_at":"2021-12-22T22:03:09.096093+00:00","modified_at":"2021-12-22T22:03:09.096093+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","yaxis":{"include_zero":true,"scale":"linear","min":"auto","max":"auto"},"title_align":"left","color_by_groups":[],"xaxis":{"include_zero":true,"scale":"linear","min":"auto","max":"auto"},"time":{},"title":"","requests":{"table":{"formulas":[{"alias":"","dimension":"x","formula":"query1"},{"alias":"","dimension":"y","formula":"query2"}],"response_format":"scalar","queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} + by {service}"},{"aggregator":"avg","data_source":"metrics","name":"query2","query":"avg:system.mem.used{*} + by {service}"}]}},"type":"scatterplot"},"layout":{"y":0,"width":47,"x":0,"height":15},"id":7197981376043092}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/ghq-yyu-mg3 + response: + body: '{"deleted_dashboard_id":"ghq-yyu-mg3"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.freeze new file mode 100644 index 00000000000..f17570689f5 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:31:29.465Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.yaml new file mode 100644 index 00000000000..08173427529 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_servicemap_widget.yaml @@ -0,0 +1,37 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_servicemap_widget-1640284289","widgets":[{"definition":{"filters":["env:none","environment:*"],"service":"","title":"","title_align":"left","title_size":"16","type":"servicemap"},"layout":{"height":15,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"m3e-fhw-dfa","title":"Test-Create_a_new_dashboard_with_servicemap_widget-1640284289","url":"/dashboard/m3e-fhw-dfa/test-createanewdashboardwithservicemapwidget-1640284289","created_at":"2021-12-23T18:31:29.624418+00:00","modified_at":"2021-12-23T18:31:29.624418+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","service":"","title":"","title_align":"left","filters":["env:none","environment:*"],"type":"servicemap"},"layout":{"y":0,"width":47,"x":0,"height":15},"id":8217718338391278}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/m3e-fhw-dfa + response: + body: '{"deleted_dashboard_id":"m3e-fhw-dfa"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.freeze new file mode 100644 index 00000000000..cb302d3fe60 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:09.400Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.yaml new file mode 100644 index 00000000000..56682af3b2f --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_slo_widget.yaml @@ -0,0 +1,72 @@ +interactions: +- request: + body: | + {"name":"Test-Create_a_new_dashboard_with_slo_widget-1640210589","query":{"denominator":"sum:httpservice.hits{!code:3xx}.as_count()","numerator":"sum:httpservice.hits{code:2xx}.as_count()"},"thresholds":[{"target":95,"timeframe":"7d","warning":98}],"type":"metric"} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/slo + response: + body: '{"data":[{"description":"","monitor_tags":[],"creator":{"handle":"frog@datadoghq.com","name":null,"email":"frog@datadoghq.com"},"thresholds":[{"warning":98.0,"warning_display":"98.","target":95.0,"target_display":"95.","timeframe":"7d"}],"type_id":1,"query":{"denominator":"sum:httpservice.hits{!code:3xx}.as_count()","numerator":"sum:httpservice.hits{code:2xx}.as_count()"},"id":"1e280ec0c98f5fe08fdad90ced08bc36","name":"Test-Create_a_new_dashboard_with_slo_widget-1640210589","created_at":1640210589,"tags":[],"modified_at":1640210589,"type":"metric"}],"error":null}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_slo_widget-1640210589","widgets":[{"definition":{"global_time_target":"0","show_error_budget":true,"slo_id":"1e280ec0c98f5fe08fdad90ced08bc36","time_windows":["7d"],"title_align":"left","title_size":"16","type":"slo","view_mode":"overall","view_type":"detail"},"layout":{"height":21,"width":60,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"cx9-y3b-anf","title":"Test-Create_a_new_dashboard_with_slo_widget-1640210589","url":"/dashboard/cx9-y3b-anf/test-createanewdashboardwithslowidget-1640210589","created_at":"2021-12-22T22:03:09.751538+00:00","modified_at":"2021-12-22T22:03:09.751538+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"time_windows":["7d"],"title_size":"16","show_error_budget":true,"view_type":"detail","title_align":"left","slo_id":"1e280ec0c98f5fe08fdad90ced08bc36","view_mode":"overall","global_time_target":"0","type":"slo"},"layout":{"y":0,"width":60,"x":0,"height":21},"id":1266323002332565}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/cx9-y3b-anf + response: + body: '{"deleted_dashboard_id":"cx9-y3b-anf"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/slo/1e280ec0c98f5fe08fdad90ced08bc36 + response: + body: '{"data":["1e280ec0c98f5fe08fdad90ced08bc36"],"error":null}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.freeze new file mode 100644 index 00000000000..7ca039cfa60 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.freeze @@ -0,0 +1 @@ +2021-12-22T22:03:11.728Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.yaml new file mode 100644 index 00000000000..38f22ee55ad --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_toplist_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_toplist_widget-1640210591","widgets":[{"definition":{"requests":[{"formulas":[{"formula":"query1","limit":{"count":10,"order":"desc"}}],"queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} by {service}"}],"response_format":"scalar"}],"time":{},"title":"","title_align":"left","title_size":"16","type":"toplist"},"layout":{"height":15,"width":47,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - '*/*' + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"kr5-73e-2gv","title":"Test-Create_a_new_dashboard_with_toplist_widget-1640210591","url":"/dashboard/kr5-73e-2gv/test-createanewdashboardwithtoplistwidget-1640210591","created_at":"2021-12-22T22:03:11.918718+00:00","modified_at":"2021-12-22T22:03:11.918718+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"title_size":"16","title":"","title_align":"left","time":{},"requests":[{"formulas":[{"formula":"query1","limit":{"count":10,"order":"desc"}}],"response_format":"scalar","queries":[{"aggregator":"avg","data_source":"metrics","name":"query1","query":"avg:system.cpu.user{*} + by {service}"}]}],"type":"toplist"},"layout":{"y":0,"width":47,"x":0,"height":15},"id":5629912304051831}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/kr5-73e-2gv + response: + body: '{"deleted_dashboard_id":"kr5-73e-2gv"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.freeze b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.freeze new file mode 100644 index 00000000000..69116308cec --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.freeze @@ -0,0 +1 @@ +2021-12-23T18:31:29.862Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.yaml b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.yaml new file mode 100644 index 00000000000..c057e8bd99f --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v1/Feature_Dashboards/Scenario_Create_a_new_dashboard_with_trace_service_widget.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: | + {"description":"","is_read_only":false,"layout_type":"free","notify_list":[],"template_variables":[],"title":"Test-Create_a_new_dashboard_with_trace_service_widget-1640284289","widgets":[{"definition":{"display_format":"two_column","env":"none","service":"","show_breakdown":true,"show_distribution":true,"show_errors":true,"show_hits":true,"show_latency":true,"show_resource_list":false,"size_format":"medium","span_name":"","time":{},"title":"Service Summary","type":"trace_service"},"layout":{"height":72,"width":72,"x":0,"y":0}}]} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + url: https://api.datadoghq.com/api/v1/dashboard + response: + body: '{"notify_list":[],"description":"","restricted_roles":[],"author_name":null,"template_variables":[],"is_read_only":false,"id":"et5-6sh-85k","title":"Test-Create_a_new_dashboard_with_trace_service_widget-1640284289","url":"/dashboard/et5-6sh-85k/test-createanewdashboardwithtraceservicewidget-1640284289","created_at":"2021-12-23T18:31:30.055214+00:00","modified_at":"2021-12-23T18:31:30.055214+00:00","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"span_name":"","type":"trace_service","service":"","title":"Service + Summary","size_format":"medium","show_hits":true,"show_errors":true,"show_breakdown":true,"env":"none","time":{},"show_distribution":true,"display_format":"two_column","show_latency":true,"show_resource_list":false},"layout":{"y":0,"width":72,"x":0,"height":72},"id":5320400184045721}],"layout_type":"free"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - application/json + method: DELETE + url: https://api.datadoghq.com/api/v1/dashboard/et5-6sh-85k + response: + body: '{"deleted_dashboard_id":"et5-6sh-85k"}' + code: 200 + duration: '' + headers: + Content-Type: + - application/json + status: 200 OK +version: 1 diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index 251e8a8e6fd..15365819202 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/dashboards.feature @@ -161,6 +161,197 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].display_type" is equal to "bars" And the response "widgets[0].definition.requests[0].q" is equal to "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()" + @team:DataDog/dashboards + Scenario: Create a new dashboard with alert_graph widget + Given there is a valid "monitor" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/alert_graph_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "alert_graph" + And the response "widgets[0].definition.viz_type" is equal to "timeseries" + And the response "widgets[0].definition.alert_id" is equal to "{{ monitor.id }}" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with alert_value widget + Given there is a valid "monitor" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/alert_value_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "alert_value" + And the response "widgets[0].definition.alert_id" is equal to "{{ monitor.id }}" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with check_status widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/check_status_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "check_status" + And the response "widgets[0].definition.check" is equal to "datadog.agent.up" + And the response "widgets[0].definition.grouping" is equal to "check" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with event_stream widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/event_stream_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "event_stream" + And the response "widgets[0].definition.query" is equal to "example-query" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with event_timeline widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/event_timeline_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "event_timeline" + And the response "widgets[0].definition.query" is equal to "status:error priority:all" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with free_text widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/free_text_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "free_text" + And the response "widgets[0].definition.text" is equal to "Example free text" + And the response "widgets[0].definition.color" is equal to "#4d4d4d" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with geomap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/geomap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "geomap" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with heatmap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/heatmap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "heatmap" + And the response "widgets[0].definition.requests[0].q" is equal to "avg:system.cpu.user{*} by {service}" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with hostmap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/hostmap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "hostmap" + And the response "widgets[0].definition.requests.fill.q" is equal to "avg:system.cpu.user{*} by {host}" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with iframe widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/iframe_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "iframe" + And the response "widgets[0].definition.url" is equal to "https://docs.datadoghq.com/api/latest/" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with image widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/image_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "image" + And the response "widgets[0].definition.url" is equal to "https://example.com/image.png" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with log_stream widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/log_stream_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "log_stream" + And the response "widgets[0].definition.query" is equal to "" + And the response "widgets[0].definition.indexes[0]" is equal to "main" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with manage_status widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/manage_status_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "manage_status" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with note widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/note_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "note" + And the response "widgets[0].definition.content" is equal to "# Example Note" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with query_value widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/query_value_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "query_value" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "avg:system.cpu.user{*}" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with scatterplot widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/scatterplot_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "scatterplot" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with slo widget + Given there is a valid "slo" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/slo_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "slo" + And the response "widgets[0].definition.slo_id" is equal to "{{ slo.data[0].id }}" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with servicemap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/servicemap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "servicemap" + And the response "widgets[0].definition.filters" is equal to ["env:none","environment:*"] + + @team:DataDog/dashboards + Scenario: Create a new dashboard with trace_service widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/trace_service_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "trace_service" + And the response "widgets[0].definition.env" is equal to "none" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with query_table widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/query_table_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "query_table" + + @team:DataDog/dashboards + Scenario: Create a new dashboard with toplist widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/toplist_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "toplist" + @generated @skip @team:DataDog/dashboards Scenario: Delete a dashboard returns "Dashboards Not Found" response Given new "DeleteDashboard" request diff --git a/tests/scenarios/features/v1/dashboards_json_payload/alert_graph_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/alert_graph_widget.json new file mode 100644 index 00000000000..e1777b33802 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/alert_graph_widget.json @@ -0,0 +1,33 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"alert_graph", + "alert_id":"{{ monitor.id }}", + "viz_type":"timeseries" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/alert_value_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/alert_value_widget.json new file mode 100644 index 00000000000..bd941285d7d --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/alert_value_widget.json @@ -0,0 +1,32 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":15, + "height":8 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"alert_value", + "alert_id":"{{ monitor.id }}", + "unit":"auto", + "text_align":"left", + "precision":2 + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/check_status_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/check_status_widget.json new file mode 100644 index 00000000000..8e346f95952 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/check_status_widget.json @@ -0,0 +1,32 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":15, + "height":8 + }, + "definition":{ + "title_size":"16", + "title_align":"left", + "type":"check_status", + "check":"datadog.agent.up", + "grouping":"check", + "tags":[ + "*" + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json new file mode 100644 index 00000000000..db582c77448 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json @@ -0,0 +1,31 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":38 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"event_stream", + "query":"example-query", + "tags_execution":"and", + "event_size":"s" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/event_timeline_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/event_timeline_widget.json new file mode 100644 index 00000000000..16d84984eba --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/event_timeline_widget.json @@ -0,0 +1,30 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":9 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"event_timeline", + "query":"status:error priority:all", + "tags_execution":"and" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/free_text_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/free_text_widget.json new file mode 100644 index 00000000000..25b242531b3 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/free_text_widget.json @@ -0,0 +1,29 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":24, + "height":6 + }, + "definition":{ + "type":"free_text", + "text":"Example free text", + "color":"#4d4d4d", + "font_size":"auto", + "text_align":"left" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/geomap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/geomap_widget.json new file mode 100644 index 00000000000..7eff35698ab --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/geomap_widget.json @@ -0,0 +1,77 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":30 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"geomap", + "requests":[ + { + "formulas":[ + { + "formula":"query1", + "limit":{ + "count":250, + "order":"desc" + } + } + ], + "queries":[ + { + "name":"query1", + "data_source":"rum", + "search":{ + "query":"" + }, + "indexes":[ + "*" + ], + "compute":{ + "aggregation":"count" + }, + "group_by":[ + { + "facet":"@geo.country_iso_code", + "limit":250, + "sort":{ + "order":"desc", + "aggregation":"count" + } + } + ] + } + ], + "response_format":"scalar" + } + ], + "style":{ + "palette":"hostmap_blues", + "palette_flip":false + }, + "view":{ + "focus":"WORLD" + } + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/heatmap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/heatmap_widget.json new file mode 100644 index 00000000000..9f31756deb6 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/heatmap_widget.json @@ -0,0 +1,39 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"heatmap", + "requests":[ + { + "q":"avg:system.cpu.user{*} by {service}", + "style":{ + "palette":"dog_classic" + } + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/hostmap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/hostmap_widget.json new file mode 100644 index 00000000000..1318ee4e751 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/hostmap_widget.json @@ -0,0 +1,40 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":22 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"hostmap", + "requests":{ + "fill":{ + "q":"avg:system.cpu.user{*} by {host}" + } + }, + "node_type":"host", + "no_metric_hosts":true, + "no_group_hosts":true, + "style":{ + "palette":"green_to_orange", + "palette_flip":false + } + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/iframe_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/iframe_widget.json new file mode 100644 index 00000000000..c6f0e167dfb --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/iframe_widget.json @@ -0,0 +1,26 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":12, + "height":12 + }, + "definition":{ + "type":"iframe", + "url":"https://docs.datadoghq.com/api/latest/" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/image_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/image_widget.json new file mode 100644 index 00000000000..ca60ce72dc8 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/image_widget.json @@ -0,0 +1,27 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":12, + "height":12 + }, + "definition":{ + "type":"image", + "url":"https://example.com/image.png", + "sizing":"cover" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/log_stream_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/log_stream_widget.json new file mode 100644 index 00000000000..0505c3d3adb --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/log_stream_widget.json @@ -0,0 +1,43 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":36 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"log_stream", + "indexes":[ + "main" + ], + "query":"", + "sort":{ + "column":"time", + "order":"desc" + }, + "columns":[ + "host", + "service" + ], + "show_date_column":true, + "show_message_column":true, + "message_display":"expanded-md" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget.json new file mode 100644 index 00000000000..086054cb4a6 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget.json @@ -0,0 +1,34 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":50, + "height":25 + }, + "definition":{ + "type":"manage_status", + "summary_type":"monitors", + "display_format":"countsAndList", + "color_preference":"text", + "hide_zero_counts":true, + "show_last_triggered":false, + "query":"", + "sort":"status,asc", + "count":50, + "start":0 + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/note_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/note_widget.json new file mode 100644 index 00000000000..4b8abf1de84 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/note_widget.json @@ -0,0 +1,26 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":18, + "height":24 + }, + "definition":{ + "type":"note", + "content":"# Example Note" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/query_table_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/query_table_widget.json new file mode 100644 index 00000000000..d9e516ff054 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/query_table_widget.json @@ -0,0 +1,58 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":54, + "height":32 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"query_table", + "requests":[ + { + "queries":[ + { + "data_source":"metrics", + "name":"query1", + "query":"avg:system.cpu.user{*} by {host}", + "aggregator":"avg" + } + ], + "formulas":[ + { + "formula":"query1", + "limit":{ + "count":500, + "order":"desc" + }, + "conditional_formats":[ + + ], + "cell_display_mode":"bar" + } + ], + "response_format":"scalar" + } + ], + "has_search_bar":"auto" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/query_value_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/query_value_widget.json new file mode 100644 index 00000000000..4d02afe6d8f --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/query_value_widget.json @@ -0,0 +1,46 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"query_value", + "requests":[ + { + "response_format":"scalar", + "queries":[ + { + "name":"query1", + "data_source":"metrics", + "query":"avg:system.cpu.user{*}", + "aggregator":"avg" + } + ] + } + ], + "autoscale":true, + "precision":2 + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/scatterplot_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/scatterplot_widget.json new file mode 100644 index 00000000000..44bec999333 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/scatterplot_widget.json @@ -0,0 +1,77 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"scatterplot", + "requests":{ + "table":{ + "formulas":[ + { + "formula":"query1", + "dimension":"x", + "alias":"" + }, + { + "formula":"query2", + "dimension":"y", + "alias":"" + } + ], + "queries":[ + { + "data_source":"metrics", + "name":"query1", + "query":"avg:system.cpu.user{*} by {service}", + "aggregator":"avg" + }, + { + "data_source":"metrics", + "name":"query2", + "query":"avg:system.mem.used{*} by {service}", + "aggregator":"avg" + } + ], + "response_format":"scalar" + } + }, + "xaxis":{ + "scale":"linear", + "include_zero":true, + "min":"auto", + "max":"auto" + }, + "yaxis":{ + "scale":"linear", + "include_zero":true, + "min":"auto", + "max":"auto" + }, + "color_by_groups":[ + + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/servicemap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/servicemap_widget.json new file mode 100644 index 00000000000..ac958dfe1e0 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/servicemap_widget.json @@ -0,0 +1,33 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"servicemap", + "service":"", + "filters":[ + "env:none", + "environment:*" + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/slo_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/slo_widget.json new file mode 100644 index 00000000000..1993c70a1cb --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/slo_widget.json @@ -0,0 +1,35 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":60, + "height":21 + }, + "definition":{ + "title_size":"16", + "title_align":"left", + "type":"slo", + "view_type":"detail", + "time_windows":[ + "7d" + ], + "slo_id":"{{ slo.data[0].id }}", + "show_error_budget":true, + "view_mode":"overall", + "global_time_target":"0" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/toplist_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/toplist_widget.json new file mode 100644 index 00000000000..9cb0760bd67 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/toplist_widget.json @@ -0,0 +1,53 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"toplist", + "requests":[ + { + "queries":[ + { + "data_source":"metrics", + "name":"query1", + "query":"avg:system.cpu.user{*} by {service}", + "aggregator":"avg" + } + ], + "formulas":[ + { + "formula":"query1", + "limit":{ + "count":10, + "order":"desc" + } + } + ], + "response_format":"scalar" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/trace_service_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/trace_service_widget.json new file mode 100644 index 00000000000..62b7bcaf002 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/trace_service_widget.json @@ -0,0 +1,40 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":72, + "height":72 + }, + "definition":{ + "title":"Service Summary", + "time":{ + + }, + "type":"trace_service", + "env":"none", + "service":"", + "span_name":"", + "show_hits":true, + "show_errors":true, + "show_latency":true, + "show_breakdown":true, + "show_distribution":true, + "show_resource_list":false, + "size_format":"medium", + "display_format":"two_column" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file