Skip to content

Commit 6d3a382

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 83eefe5 of spec repo
1 parent a159056 commit 6d3a382

46 files changed

Lines changed: 3577 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 697 additions & 1 deletion
Large diffs are not rendered by default.
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/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ apiInstance
378378
| CSM Coverage Analysis | @datadog/datadog-api-client-csm-coverage-analysis | [README.md](../../services/csm-coverage-analysis/README.md) |
379379
| CSM Threats | @datadog/datadog-api-client-csm-threats | [README.md](../../services/csm-threats/README.md) |
380380
| Dashboard Lists | @datadog/datadog-api-client-dashboard-lists | [README.md](../../services/dashboard-lists/README.md) |
381+
| Dashboard Secure Embed | @datadog/datadog-api-client-dashboard-secure-embed | [README.md](../../services/dashboard-secure-embed/README.md) |
381382
| Dashboards | @datadog/datadog-api-client-dashboards | [README.md](../../services/dashboards/README.md) |
382383
| Data Deletion | @datadog/datadog-api-client-data-deletion | [README.md](../../services/data-deletion/README.md) |
383384
| Datasets | @datadog/datadog-api-client-datasets | [README.md](../../services/datasets/README.md) |

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5778,6 +5778,54 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
57785778
},
57795779
operationResponseType: "DashboardListDeleteItemsResponse",
57805780
},
5781+
"DashboardSecureEmbedApi.V2.CreateDashboardSecureEmbed": {
5782+
dashboardId: {
5783+
type: "string",
5784+
format: "",
5785+
},
5786+
body: {
5787+
type: "SecureEmbedCreateRequest",
5788+
format: "",
5789+
},
5790+
operationResponseType: "SecureEmbedCreateResponse",
5791+
},
5792+
"DashboardSecureEmbedApi.V2.GetDashboardSecureEmbed": {
5793+
dashboardId: {
5794+
type: "string",
5795+
format: "",
5796+
},
5797+
token: {
5798+
type: "string",
5799+
format: "",
5800+
},
5801+
operationResponseType: "SecureEmbedGetResponse",
5802+
},
5803+
"DashboardSecureEmbedApi.V2.DeleteDashboardSecureEmbed": {
5804+
dashboardId: {
5805+
type: "string",
5806+
format: "",
5807+
},
5808+
token: {
5809+
type: "string",
5810+
format: "",
5811+
},
5812+
operationResponseType: "{}",
5813+
},
5814+
"DashboardSecureEmbedApi.V2.UpdateDashboardSecureEmbed": {
5815+
dashboardId: {
5816+
type: "string",
5817+
format: "",
5818+
},
5819+
token: {
5820+
type: "string",
5821+
format: "",
5822+
},
5823+
body: {
5824+
type: "SecureEmbedUpdateRequest",
5825+
format: "",
5826+
},
5827+
operationResponseType: "SecureEmbedUpdateResponse",
5828+
},
57815829
"DatasetsApi.V2.GetAllDatasets": {
57825830
operationResponseType: "DatasetResponseMulti",
57835831
},
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# @datadog/datadog-api-client-dashboard-secure-embed
2+
3+
## Description
4+
5+
Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256 signed sessions for authentication, enabling customers to embed dashboards in their own applications with server-side auth control. Unlike public dashboards (open URL) or invite dashboards (email-based access), secure embeds provide programmatic access control.
6+
**Requirements:** - Org setting: SharedDashboards > Embed sharing must be enabled. - AuthN: Datadog API key and application key. - Read operations require `dashboards_read` permission. - Write operations require `dashboards_embed_share` permission.
7+
8+
## Navigation
9+
10+
- [Installation](#installation)
11+
- [Getting Started](#getting-started)
12+
13+
## Installation
14+
15+
```sh
16+
# NPM
17+
npm install @datadog/datadog-api-client-dashboard-secure-embed
18+
# Yarn
19+
yarn add @datadog/datadog-api-client-dashboard-secure-embed
20+
```
21+
22+
## Getting Started
23+
```ts
24+
import { createConfiguration } from "@datadog/datadog-api-client";
25+
import { DashboardSecureEmbedApiV2 } from "@datadog/datadog-api-client-dashboard-secure-embed";
26+
import { v2 } from "@datadog/datadog-api-client-dashboard-secure-embed";
27+
28+
const configuration = createConfiguration();
29+
// Enable unstable operations
30+
const configurationOpts = {
31+
unstableOperations: {
32+
"DashboardSecureEmbedApi.v2.createDashboardSecureEmbed": true
33+
}
34+
}
35+
36+
const configuration = createConfiguration(configurationOpts);
37+
const apiInstance = new DashboardSecureEmbedApiV2(configuration);
38+
const params = {/* parameters */};
39+
40+
apiInstance.createDashboardSecureEmbed(params).then((data) => {
41+
console.log("API called successfully. Returned data: " + JSON.stringify(data));
42+
}).catch((error) => {
43+
console.error("Error calling API: " + error);
44+
});
45+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "@datadog/datadog-api-client-dashboard-secure-embed",
3+
"description": "",
4+
"author": "",
5+
"keywords": [
6+
"api",
7+
"fetch",
8+
"typescript"
9+
],
10+
"license": "Apache-2.0",
11+
"licenses": [
12+
{
13+
"type": "Apache-2.0",
14+
"url": "http://www.apache.org/licenses/LICENSE-2.0"
15+
}
16+
],
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/DataDog/datadog-api-client-typescript.git",
20+
"directory": "services/dashboard-secure-embed"
21+
},
22+
"files": [
23+
"dist/**/*"
24+
],
25+
"main": "./dist/index.js",
26+
"typings": "./dist/index.d.ts",
27+
"scripts": {
28+
"prepack": "yarn workspace @datadog/datadog-api-client build && yarn build",
29+
"build": "yarn generate-version-files && tsc",
30+
"generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts"
31+
},
32+
"dependencies": {
33+
"@datadog/datadog-api-client": "^2.0.0-beta.2"
34+
},
35+
"devDependencies": {
36+
"typescript": "5.8.3"
37+
},
38+
"engines": {
39+
"node": ">=18.0.0"
40+
},
41+
"version": "0.0.1",
42+
"packageManager": "yarn@4.9.1"
43+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * as v2 from "./v2";
2+
3+
export { DashboardSecureEmbedApi as DashboardSecureEmbedApiV2 } from "./v2/DashboardSecureEmbedApi";

0 commit comments

Comments
 (0)