For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/api/latest/dashboards/create-a-shared-dashboard.md. A documentation index is available at /llms.txt.
Language
Datadog site

Create a shared dashboard

POSThttps://api.datadoghq.com/api/v1/dashboard/publichttps://api.us3.datadoghq.com/api/v1/dashboard/publichttps://api.us5.datadoghq.com/api/v1/dashboard/publichttps://api.datadoghq.eu/api/v1/dashboard/publichttps://api.ap1.datadoghq.com/api/v1/dashboard/publichttps://api.ap2.datadoghq.com/api/v1/dashboard/publichttps://api.uk1.datadoghq.com/api/v1/dashboard/publichttps://api.ddog-gov.com/api/v1/dashboard/publichttps://api.us2.ddog-gov.com/api/v1/dashboard/public

Overview

Share a specified private dashboard, generating a URL at which it can be publicly viewed.

This endpoint requires any of the following permissions:

  • dashboards_public_share
  • dashboards_embed_share
  • dashboards_invite_share

OAuth apps require one of the following authorization scopes to access this endpoint: dashboards_public_share, dashboards_embed_share, dashboards_invite_share.

Request

Body Data (required)

Create a shared dashboard request body.

Field
Type
Description
dashboard_id [required]
string

ID of the dashboard to share.

dashboard_type [required]
enum

The type of the associated private dashboard.

Allowed enum values: custom_timeboard, custom_screenboard
embeddable_domains
[string]

The SharedDashboard embeddable_domains.

expiration
date-time

The time when an OPEN shared dashboard becomes publicly unavailable.

global_time
object

Object containing the live span selection for the dashboard.

global_time_selectable_enabled
boolean

Whether to allow viewers to select a different global time setting for the shared dashboard.

invitees
[object]

The SharedDashboard invitees.

selectable_template_vars
[object]

List of objects representing template variables on the shared dashboard which can have selectable values.

share_list
[string]

DEPRECATED List of email addresses that can receive an invitation to access to the shared dashboard.

share_type
enum

Type of sharing access (either open to anyone who has the public URL or invite-only).

Allowed enum values: open, invite, embed
status
enum

Active means the dashboard is publicly available. Paused means the dashboard is not publicly available.

Allowed enum values: active, paused
title
string

Title of the shared dashboard.

viewing_preferences
object

The viewing preferences for a shared dashboard.

Response

OK

The metadata object associated with how a dashboard has been/will be shared.

Field
Type
Description
author
object

User who shared the dashboard.

created
date-time

Date the dashboard was shared.

dashboard_id [required]
string

ID of the dashboard to share.

dashboard_type [required]
enum

The type of the associated private dashboard.

Allowed enum values: custom_timeboard, custom_screenboard
embeddable_domains
[string]

The SharedDashboard embeddable_domains.

expiration
date-time

The time when an OPEN shared dashboard becomes publicly unavailable.

global_time
object

Object containing the live span selection for the dashboard.

global_time_selectable_enabled
boolean

Whether to allow viewers to select a different global time setting for the shared dashboard.

invitees
[object]

The SharedDashboard invitees.

last_accessed
date-time

The last time the shared dashboard was accessed. Null if never accessed.

public_url
string

URL of the shared dashboard.

selectable_template_vars
[object]

List of objects representing template variables on the shared dashboard which can have selectable values.

share_list
[string]

DEPRECATED List of email addresses that can receive an invitation to access to the shared dashboard.

share_type
enum

Type of sharing access (either open to anyone who has the public URL or invite-only).

Allowed enum values: open, invite, embed
status
enum

Active means the dashboard is publicly available. Paused means the dashboard is not publicly available.

Allowed enum values: active, paused
title
string

Title of the shared dashboard.

token
string

A unique token assigned to the shared dashboard.

viewing_preferences
object

The viewing preferences for a shared dashboard.

Code Example

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v1/dashboard/public" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "global_time": {
    "live_span": "1h"
  },
  "share_type": "open"
}
EOF