Get a secure embed for a dashboard

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}https://api.ap2.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}https://api.datadoghq.eu/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}https://api.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}https://api.us2.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}https://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}https://api.us3.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}https://api.us5.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}

Overview

Retrieve an existing secure embed configuration for a dashboard. This endpoint requires the dashboards_read permission.

OAuth apps require the dashboards_read authorization scope to access this endpoint.

Arguments

Path Parameters

Name

Type

Description

dashboard_id [required]

string

The ID of the dashboard.

token [required]

string

The share token identifying the secure embed.

Response

OK

Response for getting a secure embed shared dashboard.

Expand All

Field

Type

Description

data [required]

object

Data object for a secure embed get response.

attributes [required]

object

Attributes of an existing secure embed shared dashboard.

created_at

string

Creation timestamp.

credential_suffix

string

Last 4 characters of the credential. Defaults to 0000 if unavailable.

dashboard_id

string

The source dashboard ID.

global_time

object

Default time range configuration for the secure embed.

live_span

enum

Dashboard global time live_span selection. Allowed enum values: 15m,1h,4h,1d,2d,1w,1mo,3mo

global_time_selectable

boolean

Whether time range is viewer-selectable.

id

string

Internal share ID.

selectable_template_vars

[object]

Template variables with their configuration.

default_values

[string]

Default selected values for the variable.

name

string

Name of the template variable. Usually matches the prefix unless you want a different display name.

prefix

string

Tag prefix for the variable (e.g., environment, service).

visible_tags

[string]

Restrict which tag values are visible to the viewer.

share_type

enum

The type of share. Always secure_embed. Allowed enum values: secure_embed

status

enum

The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. Allowed enum values: active,paused

title

string

Display title.

token

string

Public share token.

url

string

CDN URL for the shared dashboard.

viewing_preferences

object

Display settings for the secure embed shared dashboard.

high_density

boolean

Whether widgets are displayed in high density mode.

theme

enum

The theme of the shared dashboard view. system follows the viewer's system default. Allowed enum values: system,light,dark

id [required]

string

Internal share ID.

type [required]

enum

Resource type for secure embed get responses. Allowed enum values: secure_embed_get_response

{
  "data": {
    "attributes": {
      "created_at": "2026-03-11T18:30:00.000000",
      "credential_suffix": "ab3f",
      "dashboard_id": "abc-def-ghi",
      "global_time": {
        "live_span": "1h"
      },
      "global_time_selectable": true,
      "id": "12345",
      "selectable_template_vars": [
        {
          "default_values": [
            "1"
          ],
          "name": "org_id",
          "prefix": "org_id",
          "visible_tags": [
            "1"
          ]
        }
      ],
      "share_type": "secure_embed",
      "status": "active",
      "title": "Q1 Metrics Dashboard",
      "token": "s3cur3t0k3n-abcdef123456",
      "url": "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456",
      "viewing_preferences": {
        "high_density": false,
        "theme": "system"
      }
    },
    "id": "12345",
    "type": "secure_embed_get_response"
  }
}

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  # Path parameters
export dashboard_id="abc-def-ghi"
export token="s3cur3t0k3n-abcdef123456"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/dashboard/${dashboard_id}/shared/secure-embed/${token}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
"""
Get a secure embed for a dashboard returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.dashboard_secure_embed_api import DashboardSecureEmbedApi

configuration = Configuration()
configuration.unstable_operations["get_dashboard_secure_embed"] = True
with ApiClient(configuration) as api_client:
    api_instance = DashboardSecureEmbedApi(api_client)
    response = api_instance.get_dashboard_secure_embed(
        dashboard_id="dashboard_id",
        token="token",
    )

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
# Get a secure embed for a dashboard returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.get_dashboard_secure_embed".to_sym] = true
end
api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new
p api_instance.get_dashboard_secure_embed("dashboard_id", "token")

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
// Get a secure embed for a dashboard returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	configuration.SetUnstableOperationEnabled("v2.GetDashboardSecureEmbed", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewDashboardSecureEmbedApi(apiClient)
	resp, r, err := api.GetDashboardSecureEmbed(ctx, "dashboard_id", "token")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DashboardSecureEmbedApi.GetDashboardSecureEmbed`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `DashboardSecureEmbedApi.GetDashboardSecureEmbed`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
// Get a secure embed for a dashboard returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DashboardSecureEmbedApi;
import com.datadog.api.client.v2.model.SecureEmbedGetResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setUnstableOperationEnabled("v2.getDashboardSecureEmbed", true);
    DashboardSecureEmbedApi apiInstance = new DashboardSecureEmbedApi(defaultClient);

    try {
      SecureEmbedGetResponse result =
          apiInstance.getDashboardSecureEmbed("abc-def-ghi", "s3cur3t0k3n-abcdef123456");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DashboardSecureEmbedApi#getDashboardSecureEmbed");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

First install the library and its dependencies and then save the example to Example.java and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
// Get a secure embed for a dashboard returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_dashboard_secure_embed::DashboardSecureEmbedAPI;

#[tokio::main]
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.GetDashboardSecureEmbed", true);
    let api = DashboardSecureEmbedAPI::with_config(configuration);
    let resp = api
        .get_dashboard_secure_embed("dashboard_id".to_string(), "token".to_string())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
/**
 * Get a secure embed for a dashboard returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.getDashboardSecureEmbed"] = true;
const apiInstance = new v2.DashboardSecureEmbedApi(configuration);

const params: v2.DashboardSecureEmbedApiGetDashboardSecureEmbedRequest = {
  dashboardId: "dashboard_id",
  token: "token",
};

apiInstance
  .getDashboardSecureEmbed(params)
  .then((data: v2.SecureEmbedGetResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"