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

대시보드용 보안 임베드 생성

경고Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.us3.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.us5.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.datadoghq.eu/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.ap1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.ap2.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.uk1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embedhttps://api.us2.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed

개요

대시보드에 대한 보안 임베드 공유를 생성합니다. 응답에는 HMAC-SHA256 서명에 사용되는 일회성 credential이 포함됩니다. 이 정보는 다시 불러올 수 없으므로 안전한 곳에 저장해 두세요.

This endpoint requires the dashboards_embed_share permission.

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

인수

경로 파라미터

이름
유형
설명
dashboard_id [required]
string

The ID of the dashboard.

요청

Body Data (required)

보안 임베드 생성 요청 본문입니다.

항목
유형
설명
data [required]
object

보안 임베드 공유 대시보드 생성 요청입니다.

응답

OK

Response for creating a secure embed shared dashboard.

항목
유형
설명
data [required]
object

Data object for a secure embed create response.

코드 예시

대시보드용 보안 임베드 생성
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF
# Path parameters
export dashboard_id="abc-def-ghi"

# 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/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "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"
  }
}
EOF