From 5222b469cab69a8d8a76a98920789a29af657097 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 4 Jan 2022 17:35:35 +0000 Subject: [PATCH] Regenerate client from commit a4fe6c9 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 14 +- .../docs/UsageAttributionPagination.md | 80 +++++-- .../model_usage_attribution_pagination.go | 120 +++++++++-- .../scenarios/features/v1/dashboards.feature | 202 +++++++++--------- 5 files changed, 280 insertions(+), 144 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 278727bd0ea..f7f694082ac 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2022-01-04 14:44:52.038371", - "spec_repo_commit": "116ef08" + "regenerated": "2022-01-04 17:34:44.464825", + "spec_repo_commit": "a4fe6c9" }, "v2": { "apigentools_version": "1.5.1.dev2", - "regenerated": "2022-01-04 14:44:52.058365", - "spec_repo_commit": "116ef08" + "regenerated": "2022-01-04 17:34:44.483965", + "spec_repo_commit": "a4fe6c9" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index b98a0fc6303..e3a8dfc8083 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -12037,12 +12037,18 @@ components: description: Maximum amount of records to be returned. format: int64 type: integer - next_record_id: - description: The cursor to use to get the next results, if any. To make - the next request, use the same parameters with the addition of this next_record_id. + offset: + description: Records to be skipped before beginning to return. + format: int64 + type: integer + sort_direction: + description: Direction to sort by. + type: string + sort_name: + description: Field to sort by. type: string total_number_of_records: - description: Total number of records. (deprecated after May 1st, 2021) + description: Total number of records. format: int64 type: integer type: object diff --git a/api/v1/datadog/docs/UsageAttributionPagination.md b/api/v1/datadog/docs/UsageAttributionPagination.md index ea278bf525d..a64f59e7f76 100644 --- a/api/v1/datadog/docs/UsageAttributionPagination.md +++ b/api/v1/datadog/docs/UsageAttributionPagination.md @@ -5,8 +5,10 @@ Name | Type | Description | Notes ---- | ---- | ----------- | ------ **Limit** | Pointer to **int64** | Maximum amount of records to be returned. | [optional] -**NextRecordId** | Pointer to **string** | The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of this next_record_id. | [optional] -**TotalNumberOfRecords** | Pointer to **int64** | Total number of records. (deprecated after May 1st, 2021) | [optional] +**Offset** | Pointer to **int64** | Records to be skipped before beginning to return. | [optional] +**SortDirection** | Pointer to **string** | Direction to sort by. | [optional] +**SortName** | Pointer to **string** | Field to sort by. | [optional] +**TotalNumberOfRecords** | Pointer to **int64** | Total number of records. | [optional] ## Methods @@ -52,30 +54,80 @@ SetLimit sets Limit field to given value. HasLimit returns a boolean if a field has been set. -### GetNextRecordId +### GetOffset -`func (o *UsageAttributionPagination) GetNextRecordId() string` +`func (o *UsageAttributionPagination) GetOffset() int64` -GetNextRecordId returns the NextRecordId field if non-nil, zero value otherwise. +GetOffset returns the Offset field if non-nil, zero value otherwise. -### GetNextRecordIdOk +### GetOffsetOk -`func (o *UsageAttributionPagination) GetNextRecordIdOk() (*string, bool)` +`func (o *UsageAttributionPagination) GetOffsetOk() (*int64, bool)` -GetNextRecordIdOk returns a tuple with the NextRecordId field if it's non-nil, zero value otherwise +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetNextRecordId +### SetOffset -`func (o *UsageAttributionPagination) SetNextRecordId(v string)` +`func (o *UsageAttributionPagination) SetOffset(v int64)` -SetNextRecordId sets NextRecordId field to given value. +SetOffset sets Offset field to given value. -### HasNextRecordId +### HasOffset -`func (o *UsageAttributionPagination) HasNextRecordId() bool` +`func (o *UsageAttributionPagination) HasOffset() bool` -HasNextRecordId returns a boolean if a field has been set. +HasOffset returns a boolean if a field has been set. + +### GetSortDirection + +`func (o *UsageAttributionPagination) GetSortDirection() string` + +GetSortDirection returns the SortDirection field if non-nil, zero value otherwise. + +### GetSortDirectionOk + +`func (o *UsageAttributionPagination) GetSortDirectionOk() (*string, bool)` + +GetSortDirectionOk returns a tuple with the SortDirection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSortDirection + +`func (o *UsageAttributionPagination) SetSortDirection(v string)` + +SetSortDirection sets SortDirection field to given value. + +### HasSortDirection + +`func (o *UsageAttributionPagination) HasSortDirection() bool` + +HasSortDirection returns a boolean if a field has been set. + +### GetSortName + +`func (o *UsageAttributionPagination) GetSortName() string` + +GetSortName returns the SortName field if non-nil, zero value otherwise. + +### GetSortNameOk + +`func (o *UsageAttributionPagination) GetSortNameOk() (*string, bool)` + +GetSortNameOk returns a tuple with the SortName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSortName + +`func (o *UsageAttributionPagination) SetSortName(v string)` + +SetSortName sets SortName field to given value. + +### HasSortName + +`func (o *UsageAttributionPagination) HasSortName() bool` + +HasSortName returns a boolean if a field has been set. ### GetTotalNumberOfRecords diff --git a/api/v1/datadog/model_usage_attribution_pagination.go b/api/v1/datadog/model_usage_attribution_pagination.go index f5400007a6b..158dc61a95d 100644 --- a/api/v1/datadog/model_usage_attribution_pagination.go +++ b/api/v1/datadog/model_usage_attribution_pagination.go @@ -16,9 +16,13 @@ import ( type UsageAttributionPagination struct { // Maximum amount of records to be returned. Limit *int64 `json:"limit,omitempty"` - // The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of this next_record_id. - NextRecordId *string `json:"next_record_id,omitempty"` - // Total number of records. (deprecated after May 1st, 2021) + // Records to be skipped before beginning to return. + Offset *int64 `json:"offset,omitempty"` + // Direction to sort by. + SortDirection *string `json:"sort_direction,omitempty"` + // Field to sort by. + SortName *string `json:"sort_name,omitempty"` + // Total number of records. TotalNumberOfRecords *int64 `json:"total_number_of_records,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:-` @@ -73,36 +77,100 @@ func (o *UsageAttributionPagination) SetLimit(v int64) { o.Limit = &v } -// GetNextRecordId returns the NextRecordId field value if set, zero value otherwise. -func (o *UsageAttributionPagination) GetNextRecordId() string { - if o == nil || o.NextRecordId == nil { +// GetOffset returns the Offset field value if set, zero value otherwise. +func (o *UsageAttributionPagination) GetOffset() int64 { + if o == nil || o.Offset == nil { + var ret int64 + return ret + } + return *o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageAttributionPagination) GetOffsetOk() (*int64, bool) { + if o == nil || o.Offset == nil { + return nil, false + } + return o.Offset, true +} + +// HasOffset returns a boolean if a field has been set. +func (o *UsageAttributionPagination) HasOffset() bool { + if o != nil && o.Offset != nil { + return true + } + + return false +} + +// SetOffset gets a reference to the given int64 and assigns it to the Offset field. +func (o *UsageAttributionPagination) SetOffset(v int64) { + o.Offset = &v +} + +// GetSortDirection returns the SortDirection field value if set, zero value otherwise. +func (o *UsageAttributionPagination) GetSortDirection() string { + if o == nil || o.SortDirection == nil { + var ret string + return ret + } + return *o.SortDirection +} + +// GetSortDirectionOk returns a tuple with the SortDirection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UsageAttributionPagination) GetSortDirectionOk() (*string, bool) { + if o == nil || o.SortDirection == nil { + return nil, false + } + return o.SortDirection, true +} + +// HasSortDirection returns a boolean if a field has been set. +func (o *UsageAttributionPagination) HasSortDirection() bool { + if o != nil && o.SortDirection != nil { + return true + } + + return false +} + +// SetSortDirection gets a reference to the given string and assigns it to the SortDirection field. +func (o *UsageAttributionPagination) SetSortDirection(v string) { + o.SortDirection = &v +} + +// GetSortName returns the SortName field value if set, zero value otherwise. +func (o *UsageAttributionPagination) GetSortName() string { + if o == nil || o.SortName == nil { var ret string return ret } - return *o.NextRecordId + return *o.SortName } -// GetNextRecordIdOk returns a tuple with the NextRecordId field value if set, nil otherwise +// GetSortNameOk returns a tuple with the SortName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UsageAttributionPagination) GetNextRecordIdOk() (*string, bool) { - if o == nil || o.NextRecordId == nil { +func (o *UsageAttributionPagination) GetSortNameOk() (*string, bool) { + if o == nil || o.SortName == nil { return nil, false } - return o.NextRecordId, true + return o.SortName, true } -// HasNextRecordId returns a boolean if a field has been set. -func (o *UsageAttributionPagination) HasNextRecordId() bool { - if o != nil && o.NextRecordId != nil { +// HasSortName returns a boolean if a field has been set. +func (o *UsageAttributionPagination) HasSortName() bool { + if o != nil && o.SortName != nil { return true } return false } -// SetNextRecordId gets a reference to the given string and assigns it to the NextRecordId field. -func (o *UsageAttributionPagination) SetNextRecordId(v string) { - o.NextRecordId = &v +// SetSortName gets a reference to the given string and assigns it to the SortName field. +func (o *UsageAttributionPagination) SetSortName(v string) { + o.SortName = &v } // GetTotalNumberOfRecords returns the TotalNumberOfRecords field value if set, zero value otherwise. @@ -145,8 +213,14 @@ func (o UsageAttributionPagination) MarshalJSON() ([]byte, error) { if o.Limit != nil { toSerialize["limit"] = o.Limit } - if o.NextRecordId != nil { - toSerialize["next_record_id"] = o.NextRecordId + if o.Offset != nil { + toSerialize["offset"] = o.Offset + } + if o.SortDirection != nil { + toSerialize["sort_direction"] = o.SortDirection + } + if o.SortName != nil { + toSerialize["sort_name"] = o.SortName } if o.TotalNumberOfRecords != nil { toSerialize["total_number_of_records"] = o.TotalNumberOfRecords @@ -158,7 +232,9 @@ func (o *UsageAttributionPagination) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { Limit *int64 `json:"limit,omitempty"` - NextRecordId *string `json:"next_record_id,omitempty"` + Offset *int64 `json:"offset,omitempty"` + SortDirection *string `json:"sort_direction,omitempty"` + SortName *string `json:"sort_name,omitempty"` TotalNumberOfRecords *int64 `json:"total_number_of_records,omitempty"` }{} err = json.Unmarshal(bytes, &all) @@ -171,7 +247,9 @@ func (o *UsageAttributionPagination) UnmarshalJSON(bytes []byte) (err error) { return nil } o.Limit = all.Limit - o.NextRecordId = all.NextRecordId + o.Offset = all.Offset + o.SortDirection = all.SortDirection + o.SortName = all.SortName o.TotalNumberOfRecords = all.TotalNumberOfRecords return nil } diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index 15365819202..d4257e7238a 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/dashboards.feature @@ -48,6 +48,27 @@ Feature: Dashboards When the request is sent Then the response status is 200 OK + @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 an audit logs query Given new "CreateDashboard" request @@ -89,6 +110,16 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].queries[0].primary_tag_name" is equal to "datacenter" And the response "widgets[0].definition.requests[0].queries[0].operation_name" is equal to "cassandra.query" + @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 distribution widget and apm stats data Given new "CreateDashboard" request @@ -101,6 +132,24 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].apm_stats_query.service" is equal to "cassandra" And the response "widgets[0].definition.requests[0].apm_stats_query.name" is equal to "cassandra.query" + @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 formulas and functions scatterplot widget Given new "CreateDashboard" request @@ -123,93 +172,6 @@ Feature: Dashboards And the response "widgets[0].definition.requests.table.queries[1].aggregator" is equal to "avg" And the response "widgets[0].definition.requests.table.response_format" is equal to "scalar" - @team:DataDog/dashboards - Scenario: Create a new dashboard with funnel widget - Given new "CreateDashboard" request - And body with value {"layout_type": "ordered", "title": "{{ unique }} with funnel widget","widgets": [{"definition": {"type": "funnel","requests": [{"query":{"data_source":"rum","query_string":"","steps":[]},"request_type":"funnel"}]}}]} - When the request is sent - Then the response status is 200 OK - - @team:DataDog/dashboards - Scenario: Create a new dashboard with list_stream widget - Given new "CreateDashboard" request - And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"issue_stream","query_string":""},"response_format":"event_list"}]}}]} - When the request is sent - Then the response status is 200 OK - - @team:DataDog/dashboards - Scenario: Create a new dashboard with sunburst widget and metrics data - Given new "CreateDashboard" request - And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "type": "sunburst", "requests": [ { "response_format": "scalar", "formulas": [ { "formula": "query1" } ], "queries": [ { "query": "sum:system.mem.used{*} by {service}", "data_source": "metrics", "name": "query1", "aggregator": "sum" } ] } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } - When the request is sent - Then the response status is 200 OK - And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" - And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "sum:system.mem.used{*} by {service}" - And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "metrics" - And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" - And the response "widgets[0].definition.requests[0].queries[0].aggregator" is equal to "sum" - And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1" - - @team:DataDog/dashboards - Scenario: Create a new dashboard with timeseries widget containing style attributes - Given new "CreateDashboard" request - And body with value {"layout_type": "ordered", "title": "{{ unique }} with timeseries widget","widgets": [{"definition": {"type": "timeseries","requests": [{"q": "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()","on_right_yaxis": false,"style": {"palette": "warm","line_type": "solid","line_width": "normal"},"display_type": "bars"}]}}]} - When the request is sent - Then the response status is 200 OK - And the response "widgets[0].definition.requests[0].on_right_yaxis" is false - And the response "widgets[0].definition.requests[0].style" is equal to {"palette": "warm","line_type": "solid","line_width": "normal"} - 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 @@ -220,6 +182,13 @@ Feature: Dashboards 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 funnel widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with funnel widget","widgets": [{"definition": {"type": "funnel","requests": [{"query":{"data_source":"rum","query_string":"","steps":[]},"request_type":"funnel"}]}}]} + When the request is sent + Then the response status is 200 OK + @team:DataDog/dashboards Scenario: Create a new dashboard with geomap widget Given new "CreateDashboard" request @@ -264,6 +233,13 @@ Feature: Dashboards 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 list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"issue_stream","query_string":""},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + @team:DataDog/dashboards Scenario: Create a new dashboard with log_stream widget Given new "CreateDashboard" request @@ -291,6 +267,14 @@ Feature: Dashboards 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_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 query_value widget Given new "CreateDashboard" request @@ -308,6 +292,15 @@ Feature: Dashboards 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 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 slo widget Given there is a valid "slo" in the system @@ -319,38 +312,45 @@ Feature: Dashboards 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 + Scenario: Create a new dashboard with sunburst widget and metrics data Given new "CreateDashboard" request - And body from file "dashboards_json_payload/servicemap_widget.json" + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "type": "sunburst", "requests": [ { "response_format": "scalar", "formulas": [ { "formula": "query1" } ], "queries": [ { "query": "sum:system.mem.used{*} by {service}", "data_source": "metrics", "name": "query1", "aggregator": "sum" } ] } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } When the request is sent Then the response status is 200 OK - And the response "widgets[0].definition.type" is equal to "servicemap" - And the response "widgets[0].definition.filters" is equal to ["env:none","environment:*"] + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "sum:system.mem.used{*} by {service}" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "metrics" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].aggregator" is equal to "sum" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1" @team:DataDog/dashboards - Scenario: Create a new dashboard with trace_service widget + Scenario: Create a new dashboard with timeseries widget containing style attributes Given new "CreateDashboard" request - And body from file "dashboards_json_payload/trace_service_widget.json" + And body with value {"layout_type": "ordered", "title": "{{ unique }} with timeseries widget","widgets": [{"definition": {"type": "timeseries","requests": [{"q": "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()","on_right_yaxis": false,"style": {"palette": "warm","line_type": "solid","line_width": "normal"},"display_type": "bars"}]}}]} 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" + And the response "widgets[0].definition.requests[0].on_right_yaxis" is false + And the response "widgets[0].definition.requests[0].style" is equal to {"palette": "warm","line_type": "solid","line_width": "normal"} + 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 query_table widget + Scenario: Create a new dashboard with toplist widget Given new "CreateDashboard" request - And body from file "dashboards_json_payload/query_table_widget.json" + 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 "query_table" + And the response "widgets[0].definition.type" is equal to "toplist" @team:DataDog/dashboards - Scenario: Create a new dashboard with toplist widget + Scenario: Create a new dashboard with trace_service widget Given new "CreateDashboard" request - And body from file "dashboards_json_payload/toplist_widget.json" + 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 "toplist" + And the response "widgets[0].definition.type" is equal to "trace_service" + And the response "widgets[0].definition.env" is equal to "none" @generated @skip @team:DataDog/dashboards Scenario: Delete a dashboard returns "Dashboards Not Found" response