Récupérer un embed spécifique
GET
https://api.datadoghq.com/api/v1/graph/embed/{embed_id}https://api.us3.datadoghq.com/api/v1/graph/embed/{embed_id}https://api.us5.datadoghq.com/api/v1/graph/embed/{embed_id}https://api.datadoghq.eu/api/v1/graph/embed/{embed_id}https://api.ap1.datadoghq.com/api/v1/graph/embed/{embed_id}https://api.ap2.datadoghq.com/api/v1/graph/embed/{embed_id}https://api.uk1.datadoghq.com/api/v1/graph/embed/{embed_id}https://api.ddog-gov.com/api/v1/graph/embed/{embed_id}https://api.us2.ddog-gov.com/api/v1/graph/embed/{embed_id}Présentation
Récupérez le fragment HTML d'un embed généré précédemment avec embed_id.
Arguments
Paramètres du chemin
Name
Type
Description
embed_id [required]string
Token of the embed.
Réponse
OK
Embeddable graph.
Champ
Type
Description
dash_namestring
Name of the dashboard the graph is on (null if none).
dash_urlstring
URL of the dashboard the graph is on (null if none).
embed_idstring
ID of the embed.
graph_titlestring
Title of the graph.
htmlstring
HTML fragment for the embed (iframe).
revokedboolean
Boolean flag for whether or not the embed is revoked.
shared_byint64
ID of the use who shared the embed.
{
"dash_name": "string",
"dash_url": "string",
"embed_id": "string",
"graph_title": "string",
"html": "string",
"revoked": false,
"shared_by": "integer"
}Authentication Error
Error response object.
Champ
Type
Description
errors [required][string]
Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Not found
Error response object.
Champ
Type
Description
errors [required][string]
Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Too many requests
Error response object.
Champ
Type
Description
errors [required][string]
Array of errors returned by the API.
{
"errors": [
"Bad Request"
]
}Exemple de code
Récupérer un embed spécifique
# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export embed_id="CHANGE_ME"
# 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 GET "https://api.${DD_SITE}/api/v1/graph/embed/${embed_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"