---
title: NerdGraph tutorial: Create, update, and revoke public sharing dashboard URLs
source: https://docs.newrelic.com/docs/apis/nerdgraph/examples/manage-live-dashboard-urls-via-api
---

With the necessary [access management configured](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#access-management) you can create, manage, and revoke publicly accessible live dashboard URLs using queries and mutations in [NerdGraph](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph),
You can also do it from the [New Relic UI](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly).

> #### ⚠️ CAUTION
>
> If a shared dashboard is not password-protected, anyone with the live URL can access and view all the information it contains. To prevent unwanted access, ensure you [create password-protected URLs](#create-dashboard-url-with-psswd-nerdgraph) or [enable password protection for existing shared URLs](#enable-password-dashboard-url-nerdgraph).

For creating, updating, or revoking a publicly accessible live dashboard URL from NerdGraph, you need the GUID of the dashboard you want to share.

1.  Go to **[one.newrelic.com > Dashboards](https://one.newrelic.com//dashboards)**.
2.  Open the dashboard you want to share.
3.  Navigate to ** > Metadata**, and copy the entity GUID of the dashboard.

**Create an URL without password protection**

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardCreateLiveUrl` mutation with following parameters:

-   `GUID`: Enter the entity GUID of the dashboard.
-   `Options`(optional) > `ttl`: Enter the time period in seconds for the URL to be live.
    -   **Minimum value**: 300 seconds (5 minutes)
    -   **Maximum value**: 631152000 seconds (20 years)
    -   **Default value**: 2592000 seconds (30 days)
-   `url`: Select this to get the live dashboard URL in the response.
-   Select any other fields you want in the response.

    #### Sample mutation [#create-public-link]

    ```graphql
    mutation {
      dashboardCreateLiveUrl(
        options: { ttl: TIME_IN_SECONDS }
        guid: "YOUR_DASHBOARD_GUID"
      ) {
        url
      }
    }
    ```

    The live dashboard URL appears in the response. This is a public URL, so you can share it with anyone.

    #### Sample response [#create-public-link-response]

    ```json
    {
      "data": {
        "dashboardCreateLiveUrl": {
          "url": "https://share.newrelic.com/dashboard/PUBLIC_LINK_ID"
        }
      }
    }
    ```

    The `PUBLIC_LINK_ID` is the ID of the shared dashboard. You can use it to update or revoke the shared dashboard URL through NerdGraph.

    > #### ⚠️ IMPORTANT
    >
    > Any content update in the dashboard on New Relic platform reflects on the shared dashboard page.

**Create an URL with password protection**

To avoid unwanted access to the shared dashboard, you can create a live dashboard URL with password protection.

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardCreateLiveUrl` mutation with following parameters:

-   `auth` > `factors` > `type`: Select `PASSWORD` to enable password protection for the live dashboard URL.
-   `GUID`: Enter the entity GUID of the dashboard.
-   `Options`(optional) > `ttl`: Enter the time period in seconds for the URL to be live.
    -   **Minimum value**: 300 seconds (5 minutes)
    -   **Maximum value**: 631152000 seconds (20 years)
    -   **Default value**: 2592000 seconds (30 days)
-   `auth` > `factors` > `password` > `value`: Select this to get the live dashboard password in the response.
-   `url`: Select this to get the live dashboard URL in the response.
-   Select any other fields you want in the response.

    #### Sample mutation [#create-public-link-with-password]

    ```graphql
    mutation {
      dashboardCreateLiveUrl(
        guid: "YOUR_DASHBOARD_GUID"
        options: { ttl: 3600 } # Optional: Set a time-to-live for the URL
        auth: { factors: [{ type: PASSWORD }] }
      ) {
        url
        uuid
        auth {
          factors {
            type
            password {
              value # REQUEST THE PASSWORD VALUE HERE
            }
          }
        }
      }
    }
    ```

    The live dashboard URL and password appear in the response.

    #### Sample response [#create-public-link-with-password-response]

    ```json
    {
      "data": {
        "dashboardCreateLiveUrl": {
          "auth": {
            "factors": [
              {
                "password": {
                  "value": "pfd-3ZZ46#3a4On5p%&¿"
                },
                "type": "PASSWORD"
              }
            ]
          },
          "url": "https://one.newrelic.com/dashboard/f6c730bf-fced-4890-ad6e-86ab6a6e8159",
          "uuid": "f6c730bf-fced-4890-ad6e-86ab6a6e8159"
        }
      }
    }
    ```

    The `uuid` is the ID of the shared dashboard. You can use it to [update](#update-dashboard-url-nerdgraph) or [revoke](revoke-dashboard-url-nerdgraph) the shared dashboard URL through NerdGraph. To share the dashboard with external users, copy the URL and password from the response. Passwords can not be retrieved later. If you lose it, you only have to [reset the password](#reset-password-dashboard-url-nerdgraph) and share it again with the users. Follow our [password management best practices](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#password-management) to manage the password securely.

**Update live dashboard expiration duration**

Make sure you have the [permissions](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard.

To update the time period for the URL to be live:

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardUpdateLiveUrl` mutation with following parameters:

-   `id`: Copy the ID from the shared dashboard URL and enter it.
-   `options` (optional) > `ttl`: Enter the time period in seconds for the URL to be live.
    -   **Minimum value**: `300` seconds (5 minutes)
    -   **Maximum value**: `631152000` seconds (20 years)
    -   **Default value**: `2592000` seconds (30 days)

#### Sample mutation [#update-public-link-request]

```graphql
mutation {
  dashboardUpdateLiveUrl(
    id: "PUBLIC_URL_ID"
    options: { ttl: TIME_IN_SECONDS }
  )
}
```

The URL appears in the response as follows. Now the URL will remain live for the updated time period.

#### Sample response [#update-public-link-response]

````json
{
  "data": {
    "dashboardUpdateLiveUrl": {
      "url": "https://share.newrelic.com/dashboard/PUBLIC_LINK_ID"
    }
  }
}
```


````

**Enable password protection for the live URL**

Make sure you have the [permissions](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard.
To enable password protection for a live dashboard URL:

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardUpdateLiveUrlAuth` mutation with following parameters:

-   `auth` > `factors` > `type`: Select `PASSWORD` to enable password protection for the live dashboard URL.
-   `id`: Copy the ID from the shared dashboard URL and enter it.
-   `auth` > `factors` > `password` > `value`: Select this to get the live dashboard password in the response.
-   Select any other fields you want in the response.

#### Sample mutation [#enable-password-protection]

```graphql
mutation {
  dashboardUpdateLiveUrlAuth(
    id: "YOUR_PUBLIC_LINK_UUID"
    auth: { factors: [{ type: PASSWORD }] }
  ) {
    factors {
      password {
        value # A NEW PASSWORD WILL BE GENERATED AND RETURNED
      }
      type
    }
  }
}
```

#### Sample response [#enable-password-protection-response]

The password appears in the response as follows.

```json
{
  "data": {
    "dashboardUpdateLiveUrlAuth": {
      "factors": [
        {
          "password": {
            "value": "system generated password"
          },
          "type": "PASSWORD"
        }
      ]
    }
  }
}
```

After enabling password for the shared dashboards, you need to share the password with the users. Copy and save the password, as you cann't retrieve it later. If you lose it, you only have to [reset the password](#reset-password-dashboard-url-nerdgraph) and share it again with the users. Follow our [password management best practices](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#password-management) to manage the password securely.

**Disable password protection for the live URL**

Make sure you have the [permissions](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard.
To disable password protection for a live dashboard URL:

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardUpdateLiveUrlAuth` mutation with following attribute values:

-   `auth` > `factors` > `type`: Select `PASSWORD` to enable password protection for the live dashboard URL.
-   `id`: Copy the ID from the shared dashboard URL and enter it.
-   `auth` > `factors`: Keep this empty.
-   `factors` > `type`: Select this to get the confirmation in response that the password value is removed.

#### Sample mutation [#disable-password-protection]

```graphql
mutation {
  dashboardUpdateLiveUrlAuth(
    id: "YOUR_PUBLIC_LINK_UUID"
    auth: { factors: [] } # Send an empty array to remove all authentication
  ) {
    factors {
      # This will be empty
      type
    }
  }
}
```

## Sample response [#disable-password-protection-response]

Verify the response appears as follows. The password is removed, and the live dashboard URL is no longer password-protected.

```json
{
  "data": {
    "dashboardUpdateLiveUrlAuth": {
      "factors": []
    }
  }
}
```

**Reset password for the live URL**

Make sure you have the [permissions](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) to modify the configuration of the shared dashboard.
To reset the password for a live dashboard URL:

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardResetLiveUrlPassword` mutation with the following attribute values:

-   `id`: Copy the ID from the shared dashboard URL and enter it.
-   `password`: Select this to get the new live dashboard password in the response.

    #### Sample mutation [#reset-password]

    ```graphql
    mutation {
      dashboardResetLiveUrlPassword(id: "YOUR_PUBLIC_LINK_UUID") {
        password
      }
    }
    ```

    #### Sample response [#reset-password-response]

    The new password appears in the response as follows.

    ```json
    {
      "data": {
        "dashboardResetLiveUrlPassword": {
          "password": "system generated password"
        }
      }
    }
    ```

    After resetting password for the shared dashboards, you need to share the new password with the users. Copy and save the password, as you cann't retrieve it later. If you lose it, you only have to reset it again. Follow our [password management best practices](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#password-management) to manage the password securely.

**Revoke a live URL**

Based on the [permissions](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) you have, you can revoke only the URLs you have created, or all URLs created by users in the account. To revoke a shared dashboard URL:

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the `dashboardRevokeLiveUrl` mutation with the following attribute value:

-   `id`: Copy the ID from the shared dashboard URL and enter it.

    #### Sample mutation [#revoke-public-link]

    ```graphql
    mutation {
      dashboardRevokeLiveUrl(id: "PUBLIC_LINK_ID") {
        id
      }
    }
    ```

    #### Sample response [#revoke-public-link-response]

    The shared dashboard URL is now revoked, and it will no longer be accessible. The response appears as follows:

    ```json
    {
      "data": {
        "dashboardRevokeLiveUrl": {
          "id": "PUBLIC_LINK_ID" //the one you passed to the mutation
        }
      }
    }
    ```

**List all shared URLs**

Based on the [permissions](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly/#configure-roles) you have, you can retrieve the list of URLs you have created, or all URLs created by users in the account. To get the list of shared dashboard URLs:

1.  Go to [NerdGraph API explorer](https://one.newrelic.com/nerdgraph-graphiql).
2.  Construct a [graph API call](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer) using the following details:

-   `actor` > `dashboard` > `liveUrls`: Use this to retrieve the list of shared dashboard URLs.
-   `filter` > `type`: Select `DASHBOARD` to filter the results for dashboard URLs.
-   Select any other fields you want in the response.

    #### Sample query [#list-public-links]

    ```graphql
    {
      actor {
        user {
          name
        }
        dashboard {
          liveUrls(filter: { type: DASHBOARD }) {
            liveUrls {
              createdAt
              type
              uuid
            }
          }
        }
      }
    }
    ```

    The list of the shared dashboard URLs appears in response.

## Related topics

[Introduction to public sharing](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/get-started-sharing-dashboards-publicly)

Introduction to public sharing for dashboards and charts, with availability and pricing details.

[Share dashboards publicly](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/share-dashboards-publicly)

Share entire dashboards with external viewers via live URLs, with password protection and expiration controls.
