Skip to main content

dashboard_usage

Creates, updates, deletes, gets or lists a dashboard_usage resource.

Overview

Namedashboard_usage
TypeResource
Iddatadog.dashboards.dashboard_usage

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe dashboard ID. (example: q5j-nti-fv6)
attributesobjectUsage statistics for a dashboard. The viewer field and all view-count fields (total_views, viewed_at, total_views_by_type) are populated only when Real User Monitoring (RUM) is active for the org.
typestringThe type of the resource. Always dashboards-usages. (dashboards-usages) (default: dashboards-usages, example: dashboards-usages)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_dashboard_usageselectdashboard_idGet usage statistics for a single dashboard. The response includes view counts, the most recent view and edit times, widget counts, and the dashboard quality score. View-count fields depend on Real User Monitoring (RUM) and are null or 0 in orgs without RUM. View counts are refreshed once per day and only reflect views recorded starting January 2025; views prior to that date are not included.
list_dashboards_usageselectpage[limit], page[offset], filter[edited_before], filter[viewed_before]Get paginated usage statistics for every dashboard in the caller's organization. Use page[limit] and page[offset] to walk the result set. Use filter[edited_before] or filter[viewed_before] to narrow results by edit or view date. View-count fields depend on Real User Monitoring (RUM) and are null or 0 in orgs without RUM. View counts are refreshed once per day and only reflect views recorded starting January 2025; views prior to that date are not included.

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.

NameDatatypeDescription
dashboard_idstringThe ID of the dashboard.
sitestringThe 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.
filter[edited_before]stringReturn only dashboards whose last edit (edited_at) is strictly before this ISO 8601 timestamp (edited_at < value; boundary matches are excluded). Must include a timezone offset (for example, Z or +00:00); naive timestamps return HTTP 400.
filter[viewed_before]stringReturn only dashboards whose most recent view (viewed_at) is strictly before this ISO 8601 timestamp, including dashboards that have never been viewed. Must include a timezone offset; naive timestamps return HTTP 400. Orgs without Real User Monitoring (RUM) will see all dashboards returned by this filter.
page[limit]integer (int64)Maximum number of dashboards to return per page. Server-side maximum is 500; values above 500 return a 400 Bad Request.
page[offset]integer (int64)Zero-based offset into the result set.

SELECT examples

Get usage statistics for a single dashboard. The response includes view counts, the most recent view and edit times, widget counts, and the dashboard quality score. View-count fields depend on Real User Monitoring (RUM) and are null or 0 in orgs without RUM. View counts are refreshed once per day and only reflect views recorded starting January 2025; views prior to that date are not included.

SELECT
id,
attributes,
type
FROM datadog.dashboards.dashboard_usage
WHERE dashboard_id = '{{ dashboard_id }}' -- required
;