Skip to content

Commit 214dc11

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 7a0287eb of spec repo (#939)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent b7ee1f5 commit 214dc11

10 files changed

+193
-9
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-04-05 16:00:07.047988",
8-
"spec_repo_commit": "18d4cb45"
7+
"regenerated": "2022-04-05 18:07:53.297690",
8+
"spec_repo_commit": "7a0287eb"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-04-05 16:00:07.059286",
13-
"spec_repo_commit": "18d4cb45"
12+
"regenerated": "2022-04-05 18:07:53.309862",
13+
"spec_repo_commit": "7a0287eb"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3815,18 +3815,22 @@ components:
38153815
x-enum-varnames:
38163816
- EVENT_LIST
38173817
ListStreamSource:
3818-
default: issue_stream
3818+
default: apm_issue_stream
38193819
description: Source from which to query items to display in the stream.
38203820
enum:
38213821
- issue_stream
38223822
- logs_stream
38233823
- audit_stream
3824-
example: issue_stream
3824+
- rum_issue_stream
3825+
- apm_issue_stream
3826+
example: apm_issue_stream
38253827
type: string
38263828
x-enum-varnames:
38273829
- ISSUE_STREAM
38283830
- LOGS_STREAM
38293831
- AUDIT_STREAM
3832+
- RUM_ISSUE_STREAM
3833+
- APM_ISSUE_STREAM
38303834
ListStreamWidgetDefinition:
38313835
description: 'The list stream visualization displays a table of recent events
38323836
in your application that
@@ -3844,7 +3848,7 @@ components:
38443848
- field: timestamp
38453849
width: auto
38463850
query:
3847-
data_source: issue_stream
3851+
data_source: apm_issue_stream
38483852
query_string: '@data_source:APM'
38493853
response_format: event_list
38503854
items:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"""
2+
Create a new dashboard with apm_issue_stream list_stream widget
3+
"""
4+
5+
from datadog_api_client.v1 import ApiClient, Configuration
6+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
7+
from datadog_api_client.v1.model.dashboard import Dashboard
8+
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
9+
from datadog_api_client.v1.model.list_stream_column import ListStreamColumn
10+
from datadog_api_client.v1.model.list_stream_column_width import ListStreamColumnWidth
11+
from datadog_api_client.v1.model.list_stream_query import ListStreamQuery
12+
from datadog_api_client.v1.model.list_stream_response_format import ListStreamResponseFormat
13+
from datadog_api_client.v1.model.list_stream_source import ListStreamSource
14+
from datadog_api_client.v1.model.list_stream_widget_definition import ListStreamWidgetDefinition
15+
from datadog_api_client.v1.model.list_stream_widget_definition_type import ListStreamWidgetDefinitionType
16+
from datadog_api_client.v1.model.list_stream_widget_request import ListStreamWidgetRequest
17+
from datadog_api_client.v1.model.widget import Widget
18+
19+
body = Dashboard(
20+
layout_type=DashboardLayoutType("ordered"),
21+
title="Example-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget with list_stream widget",
22+
widgets=[
23+
Widget(
24+
definition=ListStreamWidgetDefinition(
25+
type=ListStreamWidgetDefinitionType("list_stream"),
26+
requests=[
27+
ListStreamWidgetRequest(
28+
columns=[ListStreamColumn(width=ListStreamColumnWidth("auto"), field="timestamp")],
29+
query=ListStreamQuery(data_source=ListStreamSource("apm_issue_stream"), query_string=""),
30+
response_format=ListStreamResponseFormat("event_list"),
31+
)
32+
],
33+
)
34+
)
35+
],
36+
)
37+
38+
configuration = Configuration()
39+
with ApiClient(configuration) as api_client:
40+
api_instance = DashboardsApi(api_client)
41+
response = api_instance.create_dashboard(body=body)
42+
43+
print(response)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"""
2+
Create a new dashboard with rum_issue_stream list_stream widget
3+
"""
4+
5+
from datadog_api_client.v1 import ApiClient, Configuration
6+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
7+
from datadog_api_client.v1.model.dashboard import Dashboard
8+
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
9+
from datadog_api_client.v1.model.list_stream_column import ListStreamColumn
10+
from datadog_api_client.v1.model.list_stream_column_width import ListStreamColumnWidth
11+
from datadog_api_client.v1.model.list_stream_query import ListStreamQuery
12+
from datadog_api_client.v1.model.list_stream_response_format import ListStreamResponseFormat
13+
from datadog_api_client.v1.model.list_stream_source import ListStreamSource
14+
from datadog_api_client.v1.model.list_stream_widget_definition import ListStreamWidgetDefinition
15+
from datadog_api_client.v1.model.list_stream_widget_definition_type import ListStreamWidgetDefinitionType
16+
from datadog_api_client.v1.model.list_stream_widget_request import ListStreamWidgetRequest
17+
from datadog_api_client.v1.model.widget import Widget
18+
19+
body = Dashboard(
20+
layout_type=DashboardLayoutType("ordered"),
21+
title="Example-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget with list_stream widget",
22+
widgets=[
23+
Widget(
24+
definition=ListStreamWidgetDefinition(
25+
type=ListStreamWidgetDefinitionType("list_stream"),
26+
requests=[
27+
ListStreamWidgetRequest(
28+
columns=[ListStreamColumn(width=ListStreamColumnWidth("auto"), field="timestamp")],
29+
query=ListStreamQuery(data_source=ListStreamSource("rum_issue_stream"), query_string=""),
30+
response_format=ListStreamResponseFormat("event_list"),
31+
)
32+
],
33+
)
34+
)
35+
],
36+
)
37+
38+
configuration = Configuration()
39+
with ApiClient(configuration) as api_client:
40+
api_instance = DashboardsApi(api_client)
41+
response = api_instance.create_dashboard(body=body)
42+
43+
print(response)

src/datadog_api_client/v1/model/list_stream_source.py

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-04-05T17:19:04.966Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
interactions:
2+
- request:
3+
body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget-1649179144
4+
with list_stream widget","widgets":[{"definition":{"requests":[{"columns":[{"field":"timestamp","width":"auto"}],"query":{"data_source":"apm_issue_stream","query_string":""},"response_format":"event_list"}],"type":"list_stream"}}]}'
5+
headers:
6+
accept:
7+
- application/json
8+
content-type:
9+
- application/json
10+
method: POST
11+
uri: https://api.datadoghq.com/api/v1/dashboard
12+
response:
13+
body:
14+
string: '{"notify_list":null,"description":null,"restricted_roles":[],"author_name":null,"template_variables":null,"is_read_only":false,"id":"fbq-m3y-6wb","title":"Test-Create_a_new_dashboard_with_apm_issue_stream_list_stream_widget-1649179144
15+
with list_stream widget","url":"/dashboard/fbq-m3y-6wb/test-createanewdashboardwithapmissuestreamliststreamwidget-1649179144-with-lists","created_at":"2022-04-05T17:19:05.083182+00:00","modified_at":"2022-04-05T17:19:05.083182+00:00","author_handle":"[email protected]","widgets":[{"definition":{"requests":[{"query":{"query_string":"","data_source":"apm_issue_stream"},"response_format":"event_list","columns":[{"field":"timestamp","width":"auto"}]}],"type":"list_stream"},"id":2589925713372507}],"layout_type":"ordered"}'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: null
24+
headers:
25+
accept:
26+
- application/json
27+
method: DELETE
28+
uri: https://api.datadoghq.com/api/v1/dashboard/fbq-m3y-6wb
29+
response:
30+
body:
31+
string: '{"deleted_dashboard_id":"fbq-m3y-6wb"}'
32+
headers:
33+
content-type:
34+
- application/json
35+
status:
36+
code: 200
37+
message: OK
38+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-04-05T17:19:05.343Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
interactions:
2+
- request:
3+
body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget-1649179145
4+
with list_stream widget","widgets":[{"definition":{"requests":[{"columns":[{"field":"timestamp","width":"auto"}],"query":{"data_source":"rum_issue_stream","query_string":""},"response_format":"event_list"}],"type":"list_stream"}}]}'
5+
headers:
6+
accept:
7+
- application/json
8+
content-type:
9+
- application/json
10+
method: POST
11+
uri: https://api.datadoghq.com/api/v1/dashboard
12+
response:
13+
body:
14+
string: '{"notify_list":null,"description":null,"restricted_roles":[],"author_name":null,"template_variables":null,"is_read_only":false,"id":"847-9hf-ftb","title":"Test-Create_a_new_dashboard_with_rum_issue_stream_list_stream_widget-1649179145
15+
with list_stream widget","url":"/dashboard/847-9hf-ftb/test-createanewdashboardwithrumissuestreamliststreamwidget-1649179145-with-lists","created_at":"2022-04-05T17:19:05.444942+00:00","modified_at":"2022-04-05T17:19:05.444942+00:00","author_handle":"[email protected]","widgets":[{"definition":{"requests":[{"query":{"query_string":"","data_source":"rum_issue_stream"},"response_format":"event_list","columns":[{"field":"timestamp","width":"auto"}]}],"type":"list_stream"},"id":7299581017937461}],"layout_type":"ordered"}'
16+
headers:
17+
content-type:
18+
- application/json
19+
status:
20+
code: 200
21+
message: OK
22+
- request:
23+
body: null
24+
headers:
25+
accept:
26+
- application/json
27+
method: DELETE
28+
uri: https://api.datadoghq.com/api/v1/dashboard/847-9hf-ftb
29+
response:
30+
body:
31+
string: '{"deleted_dashboard_id":"847-9hf-ftb"}'
32+
headers:
33+
content-type:
34+
- application/json
35+
status:
36+
code: 200
37+
message: OK
38+
version: 1

tests/v1/features/dashboards.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ Feature: Dashboards
123123
And the response "widgets[0].definition.requests[0].queries[0].primary_tag_name" is equal to "datacenter"
124124
And the response "widgets[0].definition.requests[0].queries[0].operation_name" is equal to "cassandra.query"
125125

126+
@team:DataDog/dashboards
127+
Scenario: Create a new dashboard with apm_issue_stream list_stream widget
128+
Given new "CreateDashboard" request
129+
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":"apm_issue_stream","query_string":""},"response_format":"event_list"}]}}]}
130+
When the request is sent
131+
Then the response status is 200 OK
132+
126133
@team:DataDog/dashboards
127134
Scenario: Create a new dashboard with check_status widget
128135
Given new "CreateDashboard" request
@@ -297,6 +304,13 @@ Feature: Dashboards
297304
And the response "widgets[0].definition.type" is equal to "query_value"
298305
And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "avg:system.cpu.user{*}"
299306

307+
@team:DataDog/dashboards
308+
Scenario: Create a new dashboard with rum_issue_stream list_stream widget
309+
Given new "CreateDashboard" request
310+
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":"rum_issue_stream","query_string":""},"response_format":"event_list"}]}}]}
311+
When the request is sent
312+
Then the response status is 200 OK
313+
300314
@team:DataDog/dashboards
301315
Scenario: Create a new dashboard with scatterplot widget
302316
Given new "CreateDashboard" request

0 commit comments

Comments
 (0)