annotation_pages
Creates, updates, deletes, gets or lists an annotation_pages resource.
Overview
| Name | annotation_pages |
| Type | Resource |
| Id | datadog.dashboards.annotation_pages |
Fields
The following fields are returned by SELECT queries:
- get_page_annotations
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the page, prefixed with the page type and joined by a colon (for example, dashboard:abc-def-xyz or notebook:1234567890). (example: dashboard:abc-def-xyz) |
attributes | object | Attributes of the annotations on a page. |
type | string | Page annotations resource type. (page_annotations) (example: page_annotations) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_page_annotations | select | page_id, start_time, end_time | Returns all annotations on a specific page for a given time window, grouped by widget.<br />Unlike ListAnnotations, this endpoint returns a single structured object with annotations<br />indexed by their ID and a widget-to-annotation mapping for easy UI rendering. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
end_time | integer (int64) | End of the time window in milliseconds since the Unix epoch. (example: 1704153600000) |
page_id | 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). (example: dashboard:abc-def-xyz) |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
start_time | integer (int64) | Start of the time window in milliseconds since the Unix epoch. (example: 1704067200000) |
SELECT examples
- get_page_annotations
Returns all annotations on a specific page for a given time window, grouped by widget.<br />Unlike ListAnnotations, this endpoint returns a single structured object with annotations<br />indexed by their ID and a widget-to-annotation mapping for easy UI rendering.
SELECT
id,
attributes,
type
FROM datadog.dashboards.annotation_pages
WHERE page_id = '{{ page_id }}' -- required
AND start_time = '{{ start_time }}' -- required
AND end_time = '{{ end_time }}' -- required
;