Skip to content

Commit 485c41a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 83eefe5 of spec repo
1 parent 0b5317e commit 485c41a

40 files changed

+3478
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 697 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Create a secure embed for a dashboard returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createDashboardSecureEmbed"] = true;
9+
const apiInstance = new v2.DashboardSecureEmbedApi(configuration);
10+
11+
const params: v2.DashboardSecureEmbedApiCreateDashboardSecureEmbedRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
globalTime: {
16+
liveSpan: "1h",
17+
},
18+
globalTimeSelectable: true,
19+
selectableTemplateVars: [
20+
{
21+
defaultValues: ["1"],
22+
name: "org_id",
23+
prefix: "org_id",
24+
visibleTags: ["1"],
25+
},
26+
],
27+
status: "active",
28+
title: "Q1 Metrics Dashboard",
29+
viewingPreferences: {
30+
highDensity: false,
31+
theme: "system",
32+
},
33+
},
34+
type: "secure_embed_request",
35+
},
36+
},
37+
dashboardId: "dashboard_id",
38+
};
39+
40+
apiInstance
41+
.createDashboardSecureEmbed(params)
42+
.then((data: v2.SecureEmbedCreateResponse) => {
43+
console.log(
44+
"API called successfully. Returned data: " + JSON.stringify(data)
45+
);
46+
})
47+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Delete a secure embed for a dashboard returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.deleteDashboardSecureEmbed"] = true;
9+
const apiInstance = new v2.DashboardSecureEmbedApi(configuration);
10+
11+
const params: v2.DashboardSecureEmbedApiDeleteDashboardSecureEmbedRequest = {
12+
dashboardId: "dashboard_id",
13+
token: "token",
14+
};
15+
16+
apiInstance
17+
.deleteDashboardSecureEmbed(params)
18+
.then((data: any) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Get a secure embed for a dashboard returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getDashboardSecureEmbed"] = true;
9+
const apiInstance = new v2.DashboardSecureEmbedApi(configuration);
10+
11+
const params: v2.DashboardSecureEmbedApiGetDashboardSecureEmbedRequest = {
12+
dashboardId: "dashboard_id",
13+
token: "token",
14+
};
15+
16+
apiInstance
17+
.getDashboardSecureEmbed(params)
18+
.then((data: v2.SecureEmbedGetResponse) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* Update a secure embed for a dashboard returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateDashboardSecureEmbed"] = true;
9+
const apiInstance = new v2.DashboardSecureEmbedApi(configuration);
10+
11+
const params: v2.DashboardSecureEmbedApiUpdateDashboardSecureEmbedRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
globalTime: {
16+
liveSpan: "1h",
17+
},
18+
globalTimeSelectable: true,
19+
selectableTemplateVars: [
20+
{
21+
defaultValues: ["1"],
22+
name: "org_id",
23+
prefix: "org_id",
24+
visibleTags: ["1"],
25+
},
26+
],
27+
status: "active",
28+
title: "Q1 Metrics Dashboard (Updated)",
29+
viewingPreferences: {
30+
highDensity: false,
31+
theme: "system",
32+
},
33+
},
34+
type: "secure_embed_update_request",
35+
},
36+
},
37+
dashboardId: "dashboard_id",
38+
token: "token",
39+
};
40+
41+
apiInstance
42+
.updateDashboardSecureEmbed(params)
43+
.then((data: v2.SecureEmbedUpdateResponse) => {
44+
console.log(
45+
"API called successfully. Returned data: " + JSON.stringify(data)
46+
);
47+
})
48+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5768,6 +5768,54 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
57685768
},
57695769
"operationResponseType": "DashboardListDeleteItemsResponse",
57705770
},
5771+
"v2.CreateDashboardSecureEmbed": {
5772+
"dashboardId": {
5773+
"type": "string",
5774+
"format": "",
5775+
},
5776+
"body": {
5777+
"type": "SecureEmbedCreateRequest",
5778+
"format": "",
5779+
},
5780+
"operationResponseType": "SecureEmbedCreateResponse",
5781+
},
5782+
"v2.GetDashboardSecureEmbed": {
5783+
"dashboardId": {
5784+
"type": "string",
5785+
"format": "",
5786+
},
5787+
"token": {
5788+
"type": "string",
5789+
"format": "",
5790+
},
5791+
"operationResponseType": "SecureEmbedGetResponse",
5792+
},
5793+
"v2.DeleteDashboardSecureEmbed": {
5794+
"dashboardId": {
5795+
"type": "string",
5796+
"format": "",
5797+
},
5798+
"token": {
5799+
"type": "string",
5800+
"format": "",
5801+
},
5802+
"operationResponseType": "{}",
5803+
},
5804+
"v2.UpdateDashboardSecureEmbed": {
5805+
"dashboardId": {
5806+
"type": "string",
5807+
"format": "",
5808+
},
5809+
"token": {
5810+
"type": "string",
5811+
"format": "",
5812+
},
5813+
"body": {
5814+
"type": "SecureEmbedUpdateRequest",
5815+
"format": "",
5816+
},
5817+
"operationResponseType": "SecureEmbedUpdateResponse",
5818+
},
57715819
"v2.GetAllDatasets": {
57725820
"operationResponseType": "DatasetResponseMulti",
57735821
},
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
@endpoint(dashboard-secure-embed) @endpoint(dashboard-secure-embed-v2) @endpoint(https://api.datadoghq.com) @endpoint(https://api.datadoghq.eu) @endpoint(https://api.ddog-gov.com) @endpoint(https://api.us5.datadoghq.com)
2+
Feature: Dashboard Secure Embed
3+
Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256
4+
signed sessions for authentication, enabling customers to embed dashboards
5+
in their own applications with server-side auth control. Unlike public
6+
dashboards (open URL) or invite dashboards (email-based access), secure
7+
embeds provide programmatic access control. **Requirements:** - Org
8+
setting: SharedDashboards > Embed sharing must be enabled. - AuthN:
9+
Datadog API key and application key. - Read operations require
10+
`dashboards_read` permission. - Write operations require
11+
`dashboards_embed_share` permission.
12+
13+
Background:
14+
Given a valid "apiKeyAuth" key in the system
15+
And a valid "appKeyAuth" key in the system
16+
And an instance of "DashboardSecureEmbed" API
17+
18+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
19+
Scenario: Create a secure embed for a dashboard returns "Conflict — max 1000 share URLs per dashboard exceeded" response
20+
Given operation "CreateDashboardSecureEmbed" enabled
21+
And new "CreateDashboardSecureEmbed" request
22+
And request contains "dashboard_id" parameter from "REPLACE.ME"
23+
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}}
24+
When the request is sent
25+
Then the response status is 409 Conflict — max 1000 share URLs per dashboard exceeded
26+
27+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
28+
Scenario: Create a secure embed for a dashboard returns "Dashboard Not Found" response
29+
Given operation "CreateDashboardSecureEmbed" enabled
30+
And new "CreateDashboardSecureEmbed" request
31+
And request contains "dashboard_id" parameter from "REPLACE.ME"
32+
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}}
33+
When the request is sent
34+
Then the response status is 404 Dashboard Not Found
35+
36+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
37+
Scenario: Create a secure embed for a dashboard returns "OK" response
38+
Given operation "CreateDashboardSecureEmbed" enabled
39+
And new "CreateDashboardSecureEmbed" request
40+
And request contains "dashboard_id" parameter from "REPLACE.ME"
41+
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}}
42+
When the request is sent
43+
Then the response status is 200 OK
44+
45+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
46+
Scenario: Delete a secure embed for a dashboard returns "No Content" response
47+
Given operation "DeleteDashboardSecureEmbed" enabled
48+
And new "DeleteDashboardSecureEmbed" request
49+
And request contains "dashboard_id" parameter from "REPLACE.ME"
50+
And request contains "token" parameter from "REPLACE.ME"
51+
When the request is sent
52+
Then the response status is 204 No Content
53+
54+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
55+
Scenario: Delete a secure embed for a dashboard returns "Not Found" response
56+
Given operation "DeleteDashboardSecureEmbed" enabled
57+
And new "DeleteDashboardSecureEmbed" request
58+
And request contains "dashboard_id" parameter from "REPLACE.ME"
59+
And request contains "token" parameter from "REPLACE.ME"
60+
When the request is sent
61+
Then the response status is 404 Not Found
62+
63+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
64+
Scenario: Get a secure embed for a dashboard returns "Not Found" response
65+
Given operation "GetDashboardSecureEmbed" enabled
66+
And new "GetDashboardSecureEmbed" request
67+
And request contains "dashboard_id" parameter from "REPLACE.ME"
68+
And request contains "token" parameter from "REPLACE.ME"
69+
When the request is sent
70+
Then the response status is 404 Not Found
71+
72+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
73+
Scenario: Get a secure embed for a dashboard returns "OK" response
74+
Given operation "GetDashboardSecureEmbed" enabled
75+
And new "GetDashboardSecureEmbed" request
76+
And request contains "dashboard_id" parameter from "REPLACE.ME"
77+
And request contains "token" parameter from "REPLACE.ME"
78+
When the request is sent
79+
Then the response status is 200 OK
80+
81+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
82+
Scenario: Update a secure embed for a dashboard returns "Not Found" response
83+
Given operation "UpdateDashboardSecureEmbed" enabled
84+
And new "UpdateDashboardSecureEmbed" request
85+
And request contains "dashboard_id" parameter from "REPLACE.ME"
86+
And request contains "token" parameter from "REPLACE.ME"
87+
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}}
88+
When the request is sent
89+
Then the response status is 404 Not Found
90+
91+
@generated @skip @team:DataDog/dashboardsnotebooks-backend
92+
Scenario: Update a secure embed for a dashboard returns "OK" response
93+
Given operation "UpdateDashboardSecureEmbed" enabled
94+
And new "UpdateDashboardSecureEmbed" request
95+
And request contains "dashboard_id" parameter from "REPLACE.ME"
96+
And request contains "token" parameter from "REPLACE.ME"
97+
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}}
98+
When the request is sent
99+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,6 +1470,41 @@
14701470
"type": "safe"
14711471
}
14721472
},
1473+
"CreateDashboardSecureEmbed": {
1474+
"tag": "Dashboard Secure Embed",
1475+
"undo": {
1476+
"operationId": "DeleteDashboardSecureEmbed",
1477+
"parameters": [
1478+
{
1479+
"name": "dashboard_id",
1480+
"source": "data.attributes.dashboard_id"
1481+
},
1482+
{
1483+
"name": "token",
1484+
"source": "data.attributes.token"
1485+
}
1486+
],
1487+
"type": "unsafe"
1488+
}
1489+
},
1490+
"DeleteDashboardSecureEmbed": {
1491+
"tag": "Dashboard Secure Embed",
1492+
"undo": {
1493+
"type": "idempotent"
1494+
}
1495+
},
1496+
"GetDashboardSecureEmbed": {
1497+
"tag": "Dashboard Secure Embed",
1498+
"undo": {
1499+
"type": "safe"
1500+
}
1501+
},
1502+
"UpdateDashboardSecureEmbed": {
1503+
"tag": "Dashboard Secure Embed",
1504+
"undo": {
1505+
"type": "idempotent"
1506+
}
1507+
},
14731508
"GetAllDatasets": {
14741509
"tag": "Datasets",
14751510
"undo": {

packages/datadog-api-client-common/configuration.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ export function createConfiguration(
287287
"v2.searchSecurityMonitoringHistsignals": false,
288288
"v2.getCodeCoverageBranchSummary": false,
289289
"v2.getCodeCoverageCommitSummary": false,
290+
"v2.createDashboardSecureEmbed": false,
291+
"v2.deleteDashboardSecureEmbed": false,
292+
"v2.getDashboardSecureEmbed": false,
293+
"v2.updateDashboardSecureEmbed": false,
290294
"v2.createDataset": false,
291295
"v2.deleteDataset": false,
292296
"v2.getAllDatasets": false,

0 commit comments

Comments
 (0)