---
title: Get a shared dashboard
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Dashboards
---

# Get a shared dashboard{% #get-a-shared-dashboard %}

{% tab title="v1" %}

| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/dashboard/public/{token} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/dashboard/public/{token} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/dashboard/public/{token}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/dashboard/public/{token}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v1/dashboard/public/{token}  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/dashboard/public/{token}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/dashboard/public/{token} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v1/dashboard/public/{token} |

### Overview

Fetch an existing shared dashboard's sharing metadata associated with the specified token. This endpoint requires the `dashboards_read` permission.

OAuth apps require the `dashboards_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#dashboards) to access this endpoint.



### Arguments

#### Path Parameters

| Name                    | Type   | Description                                                              |
| ----------------------- | ------ | ------------------------------------------------------------------------ |
| token [*required*] | string | The token of the shared dashboard. Generated when a dashboard is shared. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
The metadata object associated with how a dashboard has been/will be shared.

| Parent field             | Field                            | Type      | Description                                                                                                                                          |
| ------------------------ | -------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|                          | author                           | object    | User who shared the dashboard.                                                                                                                       |
| author                   | handle                           | string    | Identifier of the user who shared the dashboard.                                                                                                     |
| author                   | name                             | string    | Name of the user who shared the dashboard.                                                                                                           |
|                          | created                          | date-time | Date the dashboard was shared.                                                                                                                       |
|                          | dashboard_id [*required*]   | string    | ID of the dashboard to share.                                                                                                                        |
|                          | dashboard_type [*required*] | enum      | The type of the associated private dashboard. Allowed enum values: `custom_timeboard,custom_screenboard`                                             |
|                          | embeddable_domains               | [string]  | The `SharedDashboard` `embeddable_domains`.                                                                                                          |
|                          | expiration                       | 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              | live_span                        | enum      | Dashboard global time live_span selection Allowed enum values: `15m,1h,4h,1d,2d,1w,1mo,3mo`                                                          |
|                          | global_time_selectable_enabled   | boolean   | Whether to allow viewers to select a different global time setting for the shared dashboard.                                                         |
|                          | invitees                         | [object]  | The `SharedDashboard` `invitees`.                                                                                                                    |
| invitees                 | access_expiration                | date-time | Time of the invitee expiration. Null means the invite will not expire.                                                                               |
| invitees                 | created_at                       | date-time | Time that the invitee was created.                                                                                                                   |
| invitees                 | email [*required*]          | string    | Email of the invitee.                                                                                                                                |
|                          | last_accessed                    | 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         | [object]  | List of objects representing template variables on the shared dashboard which can have selectable values.                                            |
| selectable_template_vars | default_value                    | string    | The default value of the template variable.                                                                                                          |
| selectable_template_vars | name                             | string    | Name of the template variable.                                                                                                                       |
| selectable_template_vars | prefix                           | string    | The tag/attribute key associated with the template variable.                                                                                         |
| selectable_template_vars | type                             | string    | The type of variable. This is to differentiate between filter variables (interpolated in query) and group by variables (interpolated into group by). |
| selectable_template_vars | visible_tags                     | [string]  | List of visible tag values on the shared dashboard.                                                                                                  |
|                          | share_list                       | [string]  | **DEPRECATED**: List of email addresses that can receive an invitation to access to the shared dashboard.                                            |
|                          | share_type                       | enum      | Type of sharing access (either open to anyone who has the public URL or invite-only). Allowed enum values: `open,invite,embed`                       |
|                          | status                           | enum      | Active means the dashboard is publicly available. Paused means the dashboard is not publicly available. Allowed enum values: `active,paused`         |
|                          | 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.                                                                                                      |
| viewing_preferences      | high_density                     | boolean   | Whether the widgets on the shared dashboard should be displayed with high density.                                                                   |
| viewing_preferences      | theme                            | enum      | The theme of the shared dashboard view. "system" follows your system's default viewing theme. Allowed enum values: `system,light,dark`               |

{% /tab %}

{% tab title="Example" %}

```json
{
  "author": {
    "handle": "test@datadoghq.com",
    "name": "string"
  },
  "created": "2019-09-19T10:00:00.000Z",
  "dashboard_id": "123-abc-456",
  "dashboard_type": "custom_timeboard",
  "embeddable_domains": [
    "https://domain.atlassian.net/",
    "http://myserver.com/"
  ],
  "expiration": "2019-09-19T10:00:00.000Z",
  "global_time": {
    "live_span": "1h"
  },
  "global_time_selectable_enabled": false,
  "invitees": [
    {
      "access_expiration": "2019-09-19T10:00:00.000Z",
      "created_at": "2019-09-19T10:00:00.000Z",
      "email": "test@datadoghq.com"
    }
  ],
  "last_accessed": "2019-09-19T10:00:00.000Z",
  "public_url": "string",
  "selectable_template_vars": [
    {
      "default_value": "*",
      "name": "exampleVar",
      "prefix": "test",
      "type": "string",
      "visible_tags": [
        "selectableValue1",
        "selectableValue2"
      ]
    }
  ],
  "share_list": [
    "test@datadoghq.com",
    "test2@email.com"
  ],
  "share_type": "string",
  "status": "active",
  "title": "string",
  "token": "string",
  "viewing_preferences": {
    "high_density": false,
    "theme": "string"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Shared Dashboard Not Found
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parameters export token="CHANGE_ME" \# Curl command curl -X GET "https://api.datadoghq.com/api/v1/dashboard/public/${token}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
##### 

```python
"""
Get a shared dashboard returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.dashboards_api import DashboardsApi

# there is a valid "shared_dashboard" in the system
SHARED_DASHBOARD_TOKEN = environ["SHARED_DASHBOARD_TOKEN"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = DashboardsApi(api_client)
    response = api_instance.get_public_dashboard(
        token=SHARED_DASHBOARD_TOKEN,
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Get a shared dashboard returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::DashboardsAPI.new

# there is a valid "shared_dashboard" in the system
SHARED_DASHBOARD_TOKEN = ENV["SHARED_DASHBOARD_TOKEN"]
p api_instance.get_public_dashboard(SHARED_DASHBOARD_TOKEN)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Get a shared dashboard returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)

func main() {
	// there is a valid "shared_dashboard" in the system
	SharedDashboardToken := os.Getenv("SHARED_DASHBOARD_TOKEN")

	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewDashboardsApi(apiClient)
	resp, r, err := api.GetPublicDashboard(ctx, SharedDashboardToken)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.GetPublicDashboard`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.GetPublicDashboard`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Get a shared dashboard returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardsApi;
import com.datadog.api.client.v1.model.SharedDashboard;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    DashboardsApi apiInstance = new DashboardsApi(defaultClient);

    // there is a valid "shared_dashboard" in the system
    String SHARED_DASHBOARD_TOKEN = System.getenv("SHARED_DASHBOARD_TOKEN");

    try {
      SharedDashboard result = apiInstance.getPublicDashboard(SHARED_DASHBOARD_TOKEN);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DashboardsApi#getPublicDashboard");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Get a shared dashboard returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI;

#[tokio::main]
async fn main() {
    // there is a valid "shared_dashboard" in the system
    let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
    let configuration = datadog::Configuration::new();
    let api = DashboardsAPI::with_config(configuration);
    let resp = api
        .get_public_dashboard(shared_dashboard_token.clone())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Get a shared dashboard returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.DashboardsApi(configuration);

// there is a valid "shared_dashboard" in the system
const SHARED_DASHBOARD_TOKEN = process.env.SHARED_DASHBOARD_TOKEN as string;

const params: v1.DashboardsApiGetPublicDashboardRequest = {
  token: SHARED_DASHBOARD_TOKEN,
};

apiInstance
  .getPublicDashboard(params)
  .then((data: v1.SharedDashboard) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
