Skip to content

Commit 8d451ad

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 4c3cdd2 of spec repo (#755)
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 4718793 commit 8d451ad

File tree

8 files changed

+193
-4
lines changed

8 files changed

+193
-4
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.5.1.dev2",
7-
"regenerated": "2022-01-03 15:42:01.243984",
8-
"spec_repo_commit": "e29fa5e"
7+
"regenerated": "2022-01-03 20:48:54.810514",
8+
"spec_repo_commit": "4c3cdd2"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-03 15:42:01.688130",
13-
"spec_repo_commit": "e29fa5e"
12+
"regenerated": "2022-01-03 20:48:55.301764",
13+
"spec_repo_commit": "4c3cdd2"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,12 @@ components:
915915
916916
readOnly: true
917917
type: string
918+
author_name:
919+
description: Name of the dashboard author.
920+
example: John Doe
921+
nullable: true
922+
readOnly: true
923+
type: string
918924
created_at:
919925
description: Creation date of the dashboard.
920926
format: date-time

docs/v1/Dashboard.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
Get a dashboard returns 'author_name'
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client.v1 import ApiClient, Configuration
7+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
8+
9+
# there is a valid "dashboard" in the system
10+
DASHBOARD_ID = environ["DASHBOARD_ID"]
11+
12+
configuration = Configuration()
13+
with ApiClient(configuration) as api_client:
14+
api_instance = DashboardsApi(api_client)
15+
response = api_instance.get_dashboard(dashboard_id=DASHBOARD_ID)
16+
17+
print(response)

src/datadog_api_client/v1/model/dashboard.py

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2021-12-30T21:04:23.650Z
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
interactions:
2+
- request:
3+
body: '{"layout_type":"ordered","title":"Test-Get_a_dashboard_returns_author_name_-1640898263
4+
with Profile Metrics Query","widgets":[{"definition":{"requests":[{"profile_metrics_query":{"compute":{"aggregation":"sum","facet":"@prof_core_cpu_cores"},"group_by":[{"facet":"service","limit":10,"sort":{"aggregation":"sum","facet":"@prof_core_cpu_cores","order":"desc"}}],"search":{"query":"runtime:jvm"}}}],"type":"timeseries"}}]}'
5+
headers:
6+
accept:
7+
- application/json
8+
connection:
9+
- close
10+
content-length:
11+
- '420'
12+
content-type:
13+
- application/json
14+
host:
15+
- api.datadoghq.com
16+
user-agent:
17+
- datadog-api-spec/scripts/bdd-runner
18+
x-datadog-parent-id:
19+
- '9069669680455754936'
20+
x-datadog-trace-id:
21+
- '9069669680455754936'
22+
method: POST
23+
uri: https://api.datadoghq.com/api/v1/dashboard
24+
response:
25+
body:
26+
string: '{"notify_list":null,"description":null,"restricted_roles":[],"author_name":null,"template_variables":null,"is_read_only":false,"id":"xb2-jve-hxz","title":"Test-Get_a_dashboard_returns_author_name_-1640898263
27+
with Profile Metrics Query","url":"/dashboard/xb2-jve-hxz/test-getadashboardreturnsauthorname-1640898263-with-profile-metrics-query","created_at":"2021-12-30T21:04:23.947661+00:00","modified_at":"2021-12-30T21:04:23.947661+00:00","author_handle":"[email protected]","widgets":[{"definition":{"requests":[{"profile_metrics_query":{"search":{"query":"runtime:jvm"},"group_by":[{"facet":"service","sort":{"facet":"@prof_core_cpu_cores","aggregation":"sum","order":"desc"},"limit":10}],"compute":{"facet":"@prof_core_cpu_cores","aggregation":"sum"}}}],"type":"timeseries"},"id":2446599900087366}],"layout_type":"ordered"}'
28+
headers:
29+
cache-control:
30+
- no-cache
31+
connection:
32+
- close
33+
content-length:
34+
- '826'
35+
content-security-policy:
36+
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
37+
content-type:
38+
- application/json
39+
date:
40+
- Thu, 30 Dec 2021 21:04:23 GMT
41+
pragma:
42+
- no-cache
43+
strict-transport-security:
44+
- max-age=15724800;
45+
vary:
46+
- Accept-Encoding
47+
x-content-type-options:
48+
- nosniff
49+
x-frame-options:
50+
- SAMEORIGIN
51+
status:
52+
code: 200
53+
message: OK
54+
- request:
55+
body: null
56+
headers:
57+
accept:
58+
- application/json
59+
connection:
60+
- close
61+
host:
62+
- api.datadoghq.com
63+
user-agent:
64+
- datadog-api-spec/scripts/bdd-runner
65+
x-datadog-parent-id:
66+
- '9069669680455754936'
67+
x-datadog-trace-id:
68+
- '9069669680455754936'
69+
method: GET
70+
uri: https://api.datadoghq.com/api/v1/dashboard/xb2-jve-hxz
71+
response:
72+
body:
73+
string: '{"notify_list":null,"description":null,"restricted_roles":[],"author_name":"Frog
74+
Account","template_variables":null,"is_read_only":false,"id":"xb2-jve-hxz","title":"Test-Get_a_dashboard_returns_author_name_-1640898263
75+
with Profile Metrics Query","url":"/dashboard/xb2-jve-hxz/test-getadashboardreturnsauthorname-1640898263-with-profile-metrics-query","created_at":"2021-12-30T21:04:23.947661+00:00","modified_at":"2021-12-30T21:04:23.947661+00:00","author_handle":"[email protected]","widgets":[{"definition":{"requests":[{"profile_metrics_query":{"search":{"query":"runtime:jvm"},"group_by":[{"facet":"service","sort":{"facet":"@prof_core_cpu_cores","aggregation":"sum","order":"desc"},"limit":10}],"compute":{"facet":"@prof_core_cpu_cores","aggregation":"sum"}}}],"type":"timeseries"},"id":2446599900087366}],"layout_type":"ordered"}'
76+
headers:
77+
cache-control:
78+
- no-cache
79+
connection:
80+
- close
81+
content-length:
82+
- '826'
83+
content-security-policy:
84+
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
85+
content-type:
86+
- application/json
87+
date:
88+
- Thu, 30 Dec 2021 21:04:24 GMT
89+
pragma:
90+
- no-cache
91+
strict-transport-security:
92+
- max-age=15724800;
93+
vary:
94+
- Accept-Encoding
95+
x-content-type-options:
96+
- nosniff
97+
x-frame-options:
98+
- SAMEORIGIN
99+
status:
100+
code: 200
101+
message: OK
102+
- request:
103+
body: null
104+
headers:
105+
accept:
106+
- application/json
107+
connection:
108+
- close
109+
host:
110+
- api.datadoghq.com
111+
user-agent:
112+
- datadog-api-spec/scripts/bdd-runner
113+
x-datadog-parent-id:
114+
- '9069669680455754936'
115+
x-datadog-trace-id:
116+
- '9069669680455754936'
117+
method: DELETE
118+
uri: https://api.datadoghq.com/api/v1/dashboard/xb2-jve-hxz
119+
response:
120+
body:
121+
string: '{"deleted_dashboard_id":"xb2-jve-hxz"}'
122+
headers:
123+
cache-control:
124+
- no-cache
125+
connection:
126+
- close
127+
content-length:
128+
- '38'
129+
content-security-policy:
130+
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
131+
content-type:
132+
- application/json
133+
date:
134+
- Thu, 30 Dec 2021 21:04:24 GMT
135+
pragma:
136+
- no-cache
137+
strict-transport-security:
138+
- max-age=15724800;
139+
vary:
140+
- Accept-Encoding
141+
x-content-type-options:
142+
- nosniff
143+
x-frame-options:
144+
- SAMEORIGIN
145+
status:
146+
code: 200
147+
message: OK
148+
version: 1

tests/v1/features/dashboards.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,15 @@ Feature: Dashboards
211211
When the request is sent
212212
Then the response status is 200 OK
213213

214+
@replay-only @team:DataDog/dashboards
215+
Scenario: Get a dashboard returns 'author_name'
216+
Given there is a valid "dashboard" in the system
217+
And new "GetDashboard" request
218+
And request contains "dashboard_id" parameter from "dashboard.id"
219+
When the request is sent
220+
Then the response status is 200 OK
221+
And the response "author_name" is equal to "Frog Account"
222+
214223
@team:DataDog/dashboards
215224
Scenario: Get all dashboards returns "OK" response
216225
Given new "ListDashboards" request

0 commit comments

Comments
 (0)