Skip to content

Commit 77a3eff

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 1d04508 of spec repo (#787)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e4876df commit 77a3eff

File tree

9 files changed

+138
-10
lines changed

9 files changed

+138
-10
lines changed

.apigentools-info

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"info_version": "2",
44
"spec_versions": {
55
"v1": {
6-
"apigentools_version": "1.5.1.dev2",
7-
"regenerated": "2022-01-17 16:31:50.567539",
8-
"spec_repo_commit": "9f83d50"
6+
"apigentools_version": "1.6.1",
7+
"regenerated": "2022-01-18 11:14:27.564849",
8+
"spec_repo_commit": "1d04508"
99
},
1010
"v2": {
11-
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-17 16:31:50.976389",
13-
"spec_repo_commit": "9f83d50"
11+
"apigentools_version": "1.6.1",
12+
"regenerated": "2022-01-18 11:14:28.008860",
13+
"spec_repo_commit": "1d04508"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16576,6 +16576,14 @@ paths:
1657616576
required: false
1657716577
schema:
1657816578
type: boolean
16579+
- description: 'When `true`, this query returns only deleted custom-created
16580+
16581+
or cloned dashboards. This parameter is incompatible with `filter[shared]`.'
16582+
in: query
16583+
name: filter[deleted]
16584+
required: false
16585+
schema:
16586+
type: boolean
1657916587
responses:
1658016588
'200':
1658116589
content:
@@ -16981,6 +16989,12 @@ paths:
1698116989
summary: Delete a dashboard
1698216990
tags:
1698316991
- Dashboards
16992+
x-given:
16993+
deleted_dashboard:
16994+
parameters:
16995+
- name: dashboard_id
16996+
source: dashboard.id
16997+
step: the "dashboard" was deleted
1698416998
x-menu-order: 3
1698516999
x-undo:
1698617000
type: idempotent

docs/v1/DashboardsApi.md

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get deleted dashboards returns "OK" response
3+
"""
4+
5+
from datadog_api_client.v1 import ApiClient, Configuration
6+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = DashboardsApi(api_client)
11+
response = api_instance.list_dashboards(filter_deleted=True)
12+
13+
print(response)

src/datadog_api_client/v1/api/dashboards_api.py

Lines changed: 6 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+
2022-01-17T17:43:33.193Z
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
interactions:
2+
- request:
3+
body: '{"layout_type":"ordered","title":"Test-Get_deleted_dashboards_returns_OK_response-1642441413
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+
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":"ssn-gb2-k7k","title":"Test-Get_deleted_dashboards_returns_OK_response-1642441413
15+
with Profile Metrics Query","url":"/dashboard/ssn-gb2-k7k/test-getdeleteddashboardsreturnsokresponse-1642441413-with-profile-metrics-query","created_at":"2022-01-17T17:43:33.361797+00:00","modified_at":"2022-01-17T17:43:33.361797+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":748946470803570}],"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/ssn-gb2-k7k
29+
response:
30+
body:
31+
string: '{"deleted_dashboard_id":"ssn-gb2-k7k"}'
32+
headers:
33+
content-type:
34+
- application/json
35+
status:
36+
code: 200
37+
message: OK
38+
- request:
39+
body: null
40+
headers:
41+
accept:
42+
- application/json
43+
method: GET
44+
uri: https://api.datadoghq.com/api/v1/dashboard?filter%5Bdeleted%5D=true
45+
response:
46+
body:
47+
string: '{"dashboards":[{"created_at":"2022-01-17T17:43:33.361797+00:00","author_handle":"[email protected]","is_read_only":false,"description":null,"title":"Test-Get_deleted_dashboards_returns_OK_response-1642441413
48+
with Profile Metrics Query","url":"/dashboard/ssn-gb2-k7k/test-getdeleteddashboardsreturnsokresponse-1642441413-with-profile-metrics-query","layout_type":"ordered","deleted_at":"2022-01-17T17:43:33.502200+00:00","modified_at":"2022-01-17T17:43:33.361797+00:00","id":"ssn-gb2-k7k"}]}'
49+
headers:
50+
content-type:
51+
- application/json
52+
status:
53+
code: 200
54+
message: OK
55+
- request:
56+
body: null
57+
headers:
58+
accept:
59+
- application/json
60+
method: DELETE
61+
uri: https://api.datadoghq.com/api/v1/dashboard/ssn-gb2-k7k
62+
response:
63+
body:
64+
string: '{"errors": ["Dashboard with ID ssn-gb2-k7k not found"]}'
65+
headers:
66+
content-type:
67+
- application/json
68+
status:
69+
code: 404
70+
message: Not Found
71+
version: 1

tests/v1/features/dashboards.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,15 @@ Feature: Dashboards
432432
When the request is sent
433433
Then the response status is 200 OK
434434

435+
@team:DataDog/dashboards
436+
Scenario: Get deleted dashboards returns "OK" response
437+
Given new "ListDashboards" request
438+
And there is a valid "dashboard" in the system
439+
And the "dashboard" was deleted
440+
And request contains "filter[deleted]" parameter with value true
441+
When the request is sent
442+
Then the response status is 200 OK
443+
435444
@generated @skip @team:DataDog/dashboards
436445
Scenario: Restore deleted dashboards returns "Bad Request" response
437446
Given new "RestoreDashboards" request

tests/v1/features/given.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323
"tag": "Dashboard Lists",
2424
"operationId": "CreateDashboardList"
2525
},
26+
{
27+
"parameters": [
28+
{
29+
"name": "dashboard_id",
30+
"source": "dashboard.id"
31+
}
32+
],
33+
"step": "the \"dashboard\" was deleted",
34+
"key": "deleted_dashboard",
35+
"tag": "Dashboards",
36+
"operationId": "DeleteDashboard"
37+
},
2638
{
2739
"parameters": [
2840
{

0 commit comments

Comments
 (0)