With the necessary security and access set up you can create, manage, and revoke publicly accessible live dashboard URLs using queries and mutations in NerdGraph, You can also do it from the New Relic UI.
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 or enable password protection for existing shared URLs.
For creating, updating, or revoking a publicly accessible live dashboard URL from NerdGraph, you need the GUID of the dashboard you want to share.
- Go to one.newrelic.com > Dashboards.
- Open the dashboard you want to share.
- Navigate to > Metadata, and copy the entity GUID of the dashboard.
- Go to NerdGraph API explorer.
- Construct a graph API call 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
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
{"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.
To avoid unwanted access to the shared dashboard, you can create a live dashboard URL with password protection.
- Go to NerdGraph API explorer.
- Construct a graph API call using the
dashboardCreateLiveUrl
mutation with following parameters:
auth
>factors
>type
: SelectPASSWORD
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
mutation {dashboardCreateLiveUrl(guid: "YOUR_DASHBOARD_GUID"options: { ttl: 3600 } # Optional: Set a time-to-live for the URLauth: { factors: [{ type: PASSWORD }] }) {urluuidauth {factors {typepassword {value # REQUEST THE PASSWORD VALUE HERE}}}}}The live dashboard URL and password appear in the response.
Sample response
{"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 or revoke 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 and share it again with the users. Follow our password management best practices to manage the password securely.
Make sure you have the permissions to modify the configuration of the shared dashboard.
To update the time period for the URL to be live:
- Go to NerdGraph API explorer.
- Construct a graph API call 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
mutation { dashboardUpdateLiveUrl( id: "enter the public URL ID" options: { ttl: "updated duration in seconds" } )}
The URL appears in the response as follows. Now the URL will remain live for the updated time period.
Sample response
{ "data": { "dashboardUpdateLiveUrl": { "url": "https://share.newrelic.com/dashboard/PUBLIC_LINK_ID" } }}
Make sure you have the permissions to modify the configuration of the shared dashboard. To enable password protection for a live dashboard URL:
- Go to NerdGraph API explorer.
- Construct a graph API call using the
dashboardUpdateLiveUrlAuth
mutation with following parameters:
auth
>factors
>type
: SelectPASSWORD
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
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
The password appears in the response as follows.
{ "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 and share it again with the users. Follow our password management best practices to manage the password securely.
Make sure you have the permissions to modify the configuration of the shared dashboard. To disable password protection for a live dashboard URL:
- Go to NerdGraph API explorer.
- Construct a graph API call using the
dashboardUpdateLiveUrlAuth
mutation with following attribute values:
auth
>factors
>type
: SelectPASSWORD
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
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
Verify the response appears as follows. The password is removed, and the live dashboard URL is no longer password-protected.
{ "data": { "dashboardUpdateLiveUrlAuth": { "factors": [] } }}
Make sure you have the permissions to modify the configuration of the shared dashboard. To reset the password for a live dashboard URL:
- Go to NerdGraph API explorer.
- Construct a graph API call 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
mutation {dashboardResetLiveUrlPassword(id: "YOUR_PUBLIC_LINK_UUID") {password}}Sample response
The new password appears in the response as follows.
{"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 to manage the password securely.
Based on the permissions 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:
- Go to NerdGraph API explorer.
- Construct a graph API call using the
dashboardRevokeLiveUrl
mutation with the following attribute value:
id
: Copy the ID from the shared dashboard URL and enter it.Sample mutation
mutation {dashboardRevokeLiveUrl(id: "PUBLIC_LINK_ID") {id}}Sample response
The shared dashboard URL is now revoked, and it will no longer be accessible. The response appears as follows:
{"data": {"dashboardRevokeLiveUrl": {"id": "PUBLIC_LINK_ID" //the one you passed to the mutation}}}
Based on the permissions 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:
- Go to NerdGraph API explorer.
- Construct a graph API call using the following details:
actor
>dashboard
>liveUrls
: Use this to retrieve the list of shared dashboard URLs.filter
>type
: SelectDASHBOARD
to filter the results for dashboard URLs.Select any other fields you want in the response.
Sample query
{actor {user {name}dashboard {liveUrls(filter: { type: DASHBOARD }) {liveUrls {createdAttypeuuid}}}}}The list of the shared dashboard URLs appears in response.