---
title: Eventos
description: Obtener el fragmento HTML de un embed generado previamente con embed_id.
breadcrumbs: Documentación > API > Eventos
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/llms.txt).

# Eventos

## v1 (latest)

| Datadog site      | API endpoint                                                    |
| ----------------- | --------------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/graph/embed/{embed_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/graph/embed/{embed_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/graph/embed/{embed_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/graph/embed/{embed_id}      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/graph/embed/{embed_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/graph/embed/{embed_id} |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v1/graph/embed/{embed_id} |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/graph/embed/{embed_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v1/graph/embed/{embed_id}  |

### Overview

Obtener el fragmento HTML de un embed generado previamente con `embed_id`.

### Arguments

#### Path Parameters

| Field                 | Type   | Description         |
| --------------------- | ------ | ------------------- |
| embed_id [*required*] | string | Token of the embed. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Embeddable graph.

| Field       | Type    | Description                                           |
| ----------- | ------- | ----------------------------------------------------- |
| dash_name   | string  | Name of the dashboard the graph is on (null if none). |
| dash_url    | string  | URL of the dashboard the graph is on (null if none).  |
| embed_id    | string  | ID of the embed.                                      |
| graph_title | string  | Title of the graph.                                   |
| html        | string  | HTML fragment for the embed (iframe).                 |
| revoked     | boolean | Boolean flag for whether or not the embed is revoked. |
| shared_by   | int64   | ID of the use who shared the embed.                   |
{% /tab %}

{% tab label="Example" %}
```json
{
  "dash_name": "string",
  "dash_url": "string",
  "embed_id": "string",
  "graph_title": "string",
  "html": "string",
  "revoked": false,
  "shared_by": "integer"
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Authentication Error

{% tabs %}
{% tab label="Model" %}
Error response object.

| Field               | Type     | Description                          |
| ------------------- | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not found

{% tabs %}
{% tab label="Model" %}
Error response object.

| Field               | Type     | Description                          |
| ------------------- | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
Error response object.

| Field               | Type     | Description                          |
| ------------------- | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export embed_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, 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}"
```
{% /tab %}
{% /tabs %}
