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

Get annotations for a page

ADVERTENCIANote: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
GEThttps://api.datadoghq.com/api/v2/annotation/page/{page_id}https://api.us3.datadoghq.com/api/v2/annotation/page/{page_id}https://api.us5.datadoghq.com/api/v2/annotation/page/{page_id}https://api.datadoghq.eu/api/v2/annotation/page/{page_id}https://api.ap1.datadoghq.com/api/v2/annotation/page/{page_id}https://api.ap2.datadoghq.com/api/v2/annotation/page/{page_id}https://api.uk1.datadoghq.com/api/v2/annotation/page/{page_id}https://api.ddog-gov.com/api/v2/annotation/page/{page_id}https://api.us2.ddog-gov.com/api/v2/annotation/page/{page_id}

Descripción general

Returns all annotations on a specific page for a given time window, grouped by widget. Unlike ListAnnotations, this endpoint returns a single structured object with annotations indexed by their ID and a widget-to-annotation mapping for easy UI rendering.

Argumentos

Parámetros de ruta

Nombre
Type
Descripción
page_id [required]
string

The ID of the page, prefixed with the page type and joined by a colon (for example, dashboard:abc-def-xyz or notebook:1234567890).

Cadenas de consulta

Nombre
Type
Descripción
start_time [required]
integer

Start of the time window in milliseconds since the Unix epoch.

end_time [required]
integer

End of the time window in milliseconds since the Unix epoch.

Respuesta

OK

Response containing all annotations on a page, grouped by widget.

Campo
Type
Descripción
data [required]
object

Annotations grouped by widget for a single page.

Ejemplo de código

# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export page_id="dashboard:abc-def-xyz"
# Required query arguments
export start_time="1704067200000"
export end_time="1704153600000"

# 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/v2/annotation/page/${page_id}?start_time=${start_time}&end_time=${end_time}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"