Skip to content

Commit 67c7f2a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 1d04508 of spec repo (#479)
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 1ba5e5f commit 67c7f2a

File tree

12 files changed

+299
-11
lines changed

12 files changed

+299
-11
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:49.382294",
8-
"spec_repo_commit": "9f83d50"
6+
"apigentools_version": "1.6.1",
7+
"regenerated": "2022-01-18 11:14:20.836746",
8+
"spec_repo_commit": "1d04508"
99
},
1010
"v2": {
11-
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2022-01-17 16:31:49.409832",
13-
"spec_repo_commit": "9f83d50"
11+
"apigentools_version": "1.6.1",
12+
"regenerated": "2022-01-18 11:14:20.852995",
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
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: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
{
2+
"log": {
3+
"_recordingName": "Dashboards/Get deleted dashboards returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "5.1.1"
8+
},
9+
"entries": [
10+
{
11+
"_id": "253147e56300a888ced4d4b2877120c9",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 426,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 475,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Get_deleted_dashboards_returns_OK_response-1642441413 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\"}}]}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v1/dashboard"
39+
},
40+
"response": {
41+
"bodySize": 838,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 838,
45+
"text": "{\"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 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\"}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 383,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2022-01-17T17:43:33.209Z",
61+
"time": 193
62+
},
63+
{
64+
"_id": "e1aa817af1306b2deec2238e3e5d22b8",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "application/json"
75+
}
76+
],
77+
"headersSize": 436,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v1/dashboard/ssn-gb2-k7k"
82+
},
83+
"response": {
84+
"bodySize": 38,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 38,
88+
"text": "{\"deleted_dashboard_id\":\"ssn-gb2-k7k\"}"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 382,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2022-01-17T17:43:33.408Z",
104+
"time": 156
105+
},
106+
{
107+
"_id": "f1eb1d0ab56528111b331a44b285ba99",
108+
"_order": 0,
109+
"cache": {},
110+
"request": {
111+
"bodySize": 0,
112+
"cookies": [],
113+
"headers": [
114+
{
115+
"_fromType": "array",
116+
"name": "accept",
117+
"value": "application/json"
118+
}
119+
],
120+
"headersSize": 445,
121+
"httpVersion": "HTTP/1.1",
122+
"method": "GET",
123+
"queryString": [
124+
{
125+
"name": "filter",
126+
"value": {
127+
"deleted": "true"
128+
}
129+
}
130+
],
131+
"url": "https://api.datadoghq.com/api/v1/dashboard?filter%5Bdeleted%5D=true"
132+
},
133+
"response": {
134+
"bodySize": 123456,
135+
"content": {
136+
"mimeType": "application/json",
137+
"size": 123456,
138+
"text": "{\"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 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\"}]}"
139+
},
140+
"cookies": [],
141+
"headers": [
142+
{
143+
"name": "content-type",
144+
"value": "application/json"
145+
}
146+
],
147+
"headersSize": 525,
148+
"httpVersion": "HTTP/1.1",
149+
"redirectURL": "",
150+
"status": 200,
151+
"statusText": "OK"
152+
},
153+
"startedDateTime": "2022-01-17T17:43:33.571Z",
154+
"time": 7404
155+
},
156+
{
157+
"_id": "e1aa817af1306b2deec2238e3e5d22b8",
158+
"_order": 1,
159+
"cache": {},
160+
"request": {
161+
"bodySize": 0,
162+
"cookies": [],
163+
"headers": [
164+
{
165+
"_fromType": "array",
166+
"name": "accept",
167+
"value": "application/json"
168+
}
169+
],
170+
"headersSize": 435,
171+
"httpVersion": "HTTP/1.1",
172+
"method": "DELETE",
173+
"queryString": [],
174+
"url": "https://api.datadoghq.com/api/v1/dashboard/ssn-gb2-k7k"
175+
},
176+
"response": {
177+
"bodySize": 55,
178+
"content": {
179+
"mimeType": "application/json",
180+
"size": 55,
181+
"text": "{\"errors\": [\"Dashboard with ID ssn-gb2-k7k not found\"]}"
182+
},
183+
"cookies": [],
184+
"headers": [
185+
{
186+
"name": "content-type",
187+
"value": "application/json"
188+
}
189+
],
190+
"headersSize": 382,
191+
"httpVersion": "HTTP/1.1",
192+
"redirectURL": "",
193+
"status": 404,
194+
"statusText": "Not Found"
195+
},
196+
"startedDateTime": "2022-01-17T17:43:41.026Z",
197+
"time": 80
198+
}
199+
],
200+
"pages": [],
201+
"version": "1.2"
202+
}
203+
}

docs/v1/DashboardsApi.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ const apiInstance = new v1.DashboardsApi(configuration);
332332
let params: v1.DashboardsApiListDashboardsRequest = {
333333
// boolean | When `true`, this query only returns shared custom created or cloned dashboards. (optional)
334334
filterShared: true,
335+
// boolean | When `true`, this query returns only deleted custom-created or cloned dashboards. This parameter is incompatible with `filter[shared]`. (optional)
336+
filterDeleted: true,
335337
};
336338

337339
apiInstance
@@ -346,9 +348,10 @@ apiInstance
346348

347349
### Parameters
348350

349-
| Name | Type | Description | Notes |
350-
| ---------------- | ------------- | ------------------------------------------------------------------------------------------ | -------------------------------- |
351-
| **filterShared** | [**boolean**] | When &#x60;true&#x60;, this query only returns shared custom created or cloned dashboards. | (optional) defaults to undefined |
351+
| Name | Type | Description | Notes |
352+
| ----------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
353+
| **filterShared** | [**boolean**] | When &#x60;true&#x60;, this query only returns shared custom created or cloned dashboards. | (optional) defaults to undefined |
354+
| **filterDeleted** | [**boolean**] | When &#x60;true&#x60;, this query returns only deleted custom-created or cloned dashboards. This parameter is incompatible with &#x60;filter[shared]&#x60;. | (optional) defaults to undefined |
352355

353356
### Return type
354357

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Get deleted dashboards returns "OK" response
3+
*/
4+
5+
import { v1 } from "@datadog/datadog-api-client";
6+
7+
const configuration = v1.createConfiguration();
8+
const apiInstance = new v1.DashboardsApi(configuration);
9+
10+
let params: v1.DashboardsApiListDashboardsRequest = {
11+
filterDeleted: true,
12+
};
13+
14+
apiInstance
15+
.listDashboards(params)
16+
.then((data: any) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));

features/v1/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

features/v1/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
{

packages/datadog-api-client-v1/apis/DashboardsApi.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,11 @@ export class DashboardsApiRequestFactory extends BaseAPIRequestFactory {
209209
* Get all dashboards. **Note**: This query will only return custom created or cloned dashboards. This query will not return preset dashboards.
210210
* Get all dashboards
211211
* @param filterShared When &#x60;true&#x60;, this query only returns shared custom created or cloned dashboards.
212+
* @param filterDeleted When &#x60;true&#x60;, this query returns only deleted custom-created or cloned dashboards. This parameter is incompatible with &#x60;filter[shared]&#x60;.
212213
*/
213214
public async listDashboards(
214215
filterShared?: boolean,
216+
filterDeleted?: boolean,
215217
_options?: Configuration
216218
): Promise<RequestContext> {
217219
const _config = _options || this.configuration;
@@ -234,6 +236,12 @@ export class DashboardsApiRequestFactory extends BaseAPIRequestFactory {
234236
ObjectSerializer.serialize(filterShared, "boolean", "")
235237
);
236238
}
239+
if (filterDeleted !== undefined) {
240+
requestContext.setQueryParam(
241+
"filter[deleted]",
242+
ObjectSerializer.serialize(filterDeleted, "boolean", "")
243+
);
244+
}
237245

238246
// Apply auth methods
239247
applySecurityAuthentication(_config, requestContext, [

packages/datadog-api-client-v1/types/ObjectParamAPI.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,12 @@ export interface DashboardsApiListDashboardsRequest {
886886
* @memberof DashboardsApilistDashboards
887887
*/
888888
filterShared?: boolean;
889+
/**
890+
* When &#x60;true&#x60;, this query returns only deleted custom-created or cloned dashboards. This parameter is incompatible with &#x60;filter[shared]&#x60;.
891+
* @type boolean
892+
* @memberof DashboardsApilistDashboards
893+
*/
894+
filterDeleted?: boolean;
889895
}
890896

891897
export interface DashboardsApiRestoreDashboardsRequest {
@@ -984,7 +990,9 @@ export class ObjectDashboardsApi {
984990
param: DashboardsApiListDashboardsRequest = {},
985991
options?: Configuration
986992
): Promise<DashboardSummary> {
987-
return this.api.listDashboards(param.filterShared, options).toPromise();
993+
return this.api
994+
.listDashboards(param.filterShared, param.filterDeleted, options)
995+
.toPromise();
988996
}
989997

990998
/**

0 commit comments

Comments
 (0)