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

Créer un dashboard partagé

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

Présentation

Partagez un dashboard privé spécifique. Les utilisateurs qui disposent de l'URL générée peuvent accéder au dashboard.

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.

Requête

Body Data (required)

Corps de requête pour la création d'un dashboard partagé.

Champ
Type
Description
dashboard_id [required]
string

L'objet de métadonnées associé au type de partage du dashboard.

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.

Réponse

OK

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

Champ
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.

Exemple de code

Create a shared dashboard returns "OK" response
# 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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  }
}
EOF
Create a shared dashboard with a group template variable returns "OK" response
# 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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
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",
  "share_type": "open",
  "global_time": {
    "live_span": "1h"
  },
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "group_by_var",
      "type": "group",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ]
}
EOF