shared_dashboards
Creates, updates, deletes, gets or lists a shared_dashboards resource.
Overview
| Name | shared_dashboards |
| Type | Resource |
| Id | datadog.dashboards.shared_dashboards |
Fields
The following fields are returned by SELECT queries:
- list_shared_dashboards_by_dashboard_id
- get_public_dashboard
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the shared dashboard. (example: 12345) |
attributes | object | Attributes of a shared dashboard response. |
relationships | object | Relationships of a shared dashboard. |
type | string | Shared dashboard resource type. (shared_dashboard) (default: shared_dashboard, example: shared_dashboard) |
| Name | Datatype | Description |
|---|---|---|
dashboard_id | string | ID of the dashboard to share. (example: 123-abc-456) |
author | object | User who shared the dashboard. |
created | string (date-time) | Date the dashboard was shared. |
dashboard_type | string | The type of the associated private dashboard. (custom_timeboard, custom_screenboard) (example: custom_timeboard) |
embeddable_domains | array | The SharedDashboard embeddable_domains. |
expiration | string (date-time) | The time when an OPEN shared dashboard becomes publicly unavailable. |
global_time | object | Object containing the live span selection for the dashboard. |
global_time_selectable_enabled | boolean | Whether to allow viewers to select a different global time setting for the shared dashboard. |
invitees | array | The SharedDashboard invitees. |
last_accessed | string (date-time) | The last time the shared dashboard was accessed. Null if never accessed. |
public_url | string | URL of the shared dashboard. |
selectable_template_vars | array | List of objects representing template variables on the shared dashboard which can have selectable values. |
share_list | array | List of email addresses that can receive an invitation to access to the shared dashboard. |
share_type | string | Type of sharing access (either open to anyone who has the public URL or invite-only). (open, invite, embed) |
status | string | Active means the dashboard is publicly available. Paused means the dashboard is not publicly available. (active, paused) (example: active) |
title | string | Title of the shared dashboard. |
token | string | A unique token assigned to the shared dashboard. |
viewing_preferences | object | The viewing preferences for a shared dashboard. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_shared_dashboards_by_dashboard_id | select | dashboard_id | Retrieve shared dashboards associated with the specified dashboard. | |
get_public_dashboard | select | token | Fetch an existing shared dashboard's sharing metadata associated with the specified token. | |
create_public_dashboard | insert | dashboard_id, dashboard_type | Share a specified private dashboard, generating a URL at which it can be publicly viewed. | |
update_public_dashboard | replace | token | Update a shared dashboard associated with the specified token. | |
delete_public_dashboard | delete | token | Revoke 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.
| Name | Datatype | Description |
|---|---|---|
dashboard_id | string | ID of the dashboard. |
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. |
token | string | The token of the shared dashboard. |
SELECT examples
- list_shared_dashboards_by_dashboard_id
- get_public_dashboard
Retrieve shared dashboards associated with the specified dashboard.
SELECT
id,
attributes,
relationships,
type
FROM datadog.dashboards.shared_dashboards
WHERE dashboard_id = '{{ dashboard_id }}' -- required
;
Fetch an existing shared dashboard's sharing metadata associated with the specified token.
SELECT
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
FROM datadog.dashboards.shared_dashboards
WHERE token = '{{ token }}' -- required
;
INSERT examples
- create_public_dashboard
- Manifest
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
;
# Description fields are for documentation purposes
- name: shared_dashboards
props:
- name: dashboard_id
value: "{{ dashboard_id }}"
description: |
ID of the dashboard to share.
- name: dashboard_type
value: "{{ dashboard_type }}"
description: |
The type of the associated private dashboard.
valid_values: ['custom_timeboard', 'custom_screenboard']
- name: embeddable_domains
value:
- "{{ embeddable_domains }}"
description: |
The `SharedDashboard` `embeddable_domains`.
- name: expiration
value: "{{ expiration }}"
description: |
The time when an OPEN shared dashboard becomes publicly unavailable.
- name: global_time
description: |
Object containing the live span selection for the dashboard.
value:
live_span: "{{ live_span }}"
- name: global_time_selectable_enabled
value: {{ global_time_selectable_enabled }}
description: |
Whether to allow viewers to select a different global time setting for the shared dashboard.
- name: invitees
description: |
The `SharedDashboard` `invitees`.
value:
- access_expiration: "{{ access_expiration }}"
created_at: "{{ created_at }}"
email: "{{ email }}"
- name: selectable_template_vars
description: |
List of objects representing template variables on the shared dashboard which can have selectable values.
value:
- default_value: "{{ default_value }}"
name: "{{ name }}"
prefix: "{{ prefix }}"
type: "{{ type }}"
visible_tags: "{{ visible_tags }}"
- name: share_list
value:
- "{{ share_list }}"
description: |
List of email addresses that can receive an invitation to access to the shared dashboard.
- name: share_type
value: "{{ share_type }}"
description: |
Type of sharing access (either open to anyone who has the public URL or invite-only).
valid_values: ['open', 'invite', 'embed']
- name: status
value: "{{ status }}"
description: |
Active means the dashboard is publicly available. Paused means the dashboard is not publicly available.
valid_values: ['active', 'paused']
- name: title
value: "{{ title }}"
description: |
Title of the shared dashboard.
- name: viewing_preferences
description: |
The viewing preferences for a shared dashboard.
value:
high_density: {{ high_density }}
theme: "{{ theme }}"
REPLACE examples
- update_public_dashboard
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
- delete_public_dashboard
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
;