Skip to main content

shared_dashboards

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

Overview

Nameshared_dashboards
TypeResource
Iddatadog.dashboards.shared_dashboards

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the shared dashboard. (example: 12345)
attributesobjectAttributes of a shared dashboard response.
relationshipsobjectRelationships of a shared dashboard.
typestringShared dashboard resource type. (shared_dashboard) (default: shared_dashboard, example: shared_dashboard)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_shared_dashboards_by_dashboard_idselectdashboard_idRetrieve shared dashboards associated with the specified dashboard.
get_public_dashboardselecttokenFetch an existing shared dashboard's sharing metadata associated with the specified token.
create_public_dashboardinsertdashboard_id, dashboard_typeShare a specified private dashboard, generating a URL at which it can be publicly viewed.
update_public_dashboardreplacetokenUpdate a shared dashboard associated with the specified token.
delete_public_dashboarddeletetokenRevoke the public URL for a dashboard (rendering it private) associated with the specified token.

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_idstringID 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.
tokenstringThe token of the shared dashboard.

SELECT examples

Retrieve shared dashboards associated with the specified dashboard.

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

INSERT examples

Share a specified private dashboard, generating a URL at which it can be publicly viewed.

INSERT INTO datadog.dashboards.shared_dashboards (
dashboard_id,
dashboard_type,
embeddable_domains,
expiration,
global_time,
global_time_selectable_enabled,
invitees,
selectable_template_vars,
share_list,
share_type,
status,
title,
viewing_preferences
)
SELECT
'{{ dashboard_id }}' /* required */,
'{{ dashboard_type }}' /* required */,
'{{ embeddable_domains }}',
'{{ expiration }}',
'{{ global_time }}',
{{ global_time_selectable_enabled }},
'{{ invitees }}',
'{{ selectable_template_vars }}',
'{{ share_list }}',
'{{ share_type }}',
'{{ status }}',
'{{ title }}',
'{{ viewing_preferences }}'
RETURNING
dashboard_id,
author,
created,
dashboard_type,
embeddable_domains,
expiration,
global_time,
global_time_selectable_enabled,
invitees,
last_accessed,
public_url,
selectable_template_vars,
share_list,
share_type,
status,
title,
token,
viewing_preferences
;

REPLACE examples

Update a shared dashboard associated with the specified token.

REPLACE datadog.dashboards.shared_dashboards
SET
embeddable_domains = '{{ embeddable_domains }}',
expiration = '{{ expiration }}',
global_time = '{{ global_time }}',
global_time_selectable_enabled = {{ global_time_selectable_enabled }},
invitees = '{{ invitees }}',
selectable_template_vars = '{{ selectable_template_vars }}',
share_list = '{{ share_list }}',
share_type = '{{ share_type }}',
status = '{{ status }}',
title = '{{ title }}',
viewing_preferences = '{{ viewing_preferences }}'
WHERE
token = '{{ token }}' --required
RETURNING
dashboard_id,
author,
created,
dashboard_type,
embeddable_domains,
expiration,
global_time,
global_time_selectable_enabled,
invitees,
last_accessed,
public_url,
selectable_template_vars,
share_list,
share_type,
status,
title,
token,
viewing_preferences;

DELETE examples

Revoke the public URL for a dashboard (rendering it private) associated with the specified token.

DELETE FROM datadog.dashboards.shared_dashboards
WHERE token = '{{ token }}' --required
;