Skip to content

Commit

Permalink
Merge pull request #20053 from newrelic/revert-20050-Public-dashboard…
Browse files Browse the repository at this point in the history
…-fresh

Revert "feat(fresh-public-dashboard) Feb release-Doc update for Public dashboard"
  • Loading branch information
sujitnewrelic authored Feb 24, 2025
2 parents 92ed6ea + 91718d3 commit 79e3018
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 752 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "NerdGraph tutorial: List and revoke public sharing chart URLs"
title: "NerdGraph tutorial: List and revoke live chart URLs"
tags:
- APIs
- NerdGraph
Expand All @@ -10,21 +10,21 @@ freshnessValidatedDate: never

You can list and revoke publicly accessible live chart URLs using queries and mutations in [NerdGraph](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph).

To do this:
To do so:

1. Go to [GraphiQL Explorer](https://api.newrelic.com/graphiql).
1. Go to the [GraphiQL explorer](https://api.newrelic.com/graphiql).
2. [List all live chart URLs](#list) created within your New Relic account.
3. [Revoke any live chart URL you want to](#revoke).

<Callout variant="tip">
To create publicly accessible live chart URLs, refer our [docs](/docs/query-your-data/explore-query-data/dashboards/share-charts-dashboards-externally/#chart).
See our docs [to create public live charts](/docs/query-your-data/explore-query-data/dashboards/manage-your-dashboard/#export-share).
</Callout>

## List all live chart URLs [#list]

Use the following query to retrieve a list of existing live chart URLs:

```
```graphql
{
actor {
dashboard {
Expand All @@ -48,14 +48,14 @@ Use the following query to retrieve a list of existing live chart URLs:

Use the following query to revoke the live chart URL you specify:

```
```graphql
mutation {
dashboardWidgetRevokeLiveUrl(uuid: "<enter-the-UUID-of-the-live-chart>") {
dashboardWidgetRevokeLiveUrl(uuid: "LIVE_CHART_UUID") {
uuid
errors {
description
type
}
}
}
```
```

This file was deleted.

85 changes: 14 additions & 71 deletions src/content/docs/apis/nerdgraph/examples/nerdgraph-dashboards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -248,63 +248,6 @@ Here are operations related to creating, reading, updating, and deleting (CRUD).
Revoke widget live URL operation. You can revoke a previously created live URL of a widget. As a result, the live URL will become unavailable to the public.
</td>
</tr>

<tr>
<td>
`dashboardCreateLiveUrl()`
</td>

<td>
mutation
</td>

<td>
Create publicly accessible live dashboard URL.
</td>
</tr>

<tr>
<td>
`dashboardUpdateLiveUrl()`
</td>

<td>
mutation
</td>

<td>
Update the expiration date of a publicly accessible live dashboard URL.
</td>
</tr>

<tr>
<td>
`dashboardRevokeLiveUrl()`
</td>

<td>
mutation
</td>

<td>
Revoke publicly accessible live dashboard URL.
</td>
</tr>

<tr>
<td>
`dashboardUpdateLiveUrlCreationPolicies()`
</td>

<td>
mutation
</td>

<td>
Only an Authentication Domain Manager can use this mutation to enable or disable the <DNT>**Live URL Creation**</DNT> policy for accounts. Users can create live URLs for dashboards in accounts where this policy is enabled.
</td>
</tr>

</tbody>
</table>

Expand All @@ -319,7 +262,7 @@ Here's an example of creating a cross-account dashboard:
id="cross-account-dashboard"
title="Dashboard with cross-account query"
>
```graphql
```graphql lineHighlight=21,37,53
mutation {
dashboardCreate(
accountId: 1
Expand All @@ -340,7 +283,7 @@ Here's an example of creating a cross-account dashboard:
legend: { enabled: true }
nrqlQueries: [
{
<var>accountIds: [1, 1606862, 2212585]</var>
accountIds: [1, 1606862, 2212585]
query: "SELECT count(*) FROM Transaction"
}
]
Expand All @@ -356,7 +299,7 @@ Here's an example of creating a cross-account dashboard:
legend: { enabled: true }
nrqlQueries: [
{
<var>accountIds: [1, 1606862, 2212585]</var>
accountIds: [1, 1606862, 2212585]
query: "SELECT count(*) FROM Transaction FACET accountId()"
}
]
Expand All @@ -372,7 +315,7 @@ Here's an example of creating a cross-account dashboard:
legend: { enabled: true }
nrqlQueries: [
{
<var>accountIds: [1, 1606862, 2212585]</var>
accountIds: [1, 1606862, 2212585]
query: "SELECT count(*) FROM Transaction FACET accountId() TIMESERIES"
}
]
Expand Down Expand Up @@ -622,20 +565,20 @@ All dashboard mutations offer a way to ask for errors when being executed. This
id="errors-first-class"
title="Errors as part of every mutation response"
>
```
```graphql
mutation {
dashboardMutation(guid: "<var>MY_EXISTING_DASHBOARD_GUID</var>") {
mutationResult {
result
}
errors {
description
type
}
dashboardMutation(guid: "MY_EXISTING_DASHBOARD_GUID") {
mutationResult {
result
}
errors {
description
type
}
}
}
```
</Collapser>
</CollapserGroup>

Keep in mind that these are expected errors that we are aware of in advance. You should also check for unexpected errors that will be returned in the standard [GraphQL errors field](https://graphql.org/learn/serving-over-http/#response).
Keep in mind that these are expected errors that we are aware of in advance. You should also check for unexpected errors that will be returned in the standard [GraphQL errors field](https://graphql.org/learn/serving-over-http/#response).
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Here are all our available NerdGraph docs:

<td>
* [Install browser agent and configure monitoring](/docs/apis/nerdgraph/examples/browser-monitoring-config-nerdgraph)
* [Instrument multiple apps using NPM package](/docs/apis/nerdgraph/examples/combining-npm-nerdgraph)
* [Instrument multiple apps using npm package](/docs/apis/nerdgraph/examples/combining-npm-nerdgraph)
</td>
</tr>

Expand All @@ -164,8 +164,7 @@ Here are all our available NerdGraph docs:
* [Dashboards: charts and widgets](/docs/apis/nerdgraph/examples/create-widgets-dashboards-api)
* [Export dashboards to other accounts](/docs/apis/nerdgraph/examples/export-import-dashboards-using-api/)
* [Export dashboards as files](/docs/apis/nerdgraph/examples/export-dashboards-pdfpng-using-api/)
* [Manage externally shared dashboards](/docs/apis/nerdgraph/examples/manage-live-dashboard-urls-via-api)
* [Manage externally shared charts](/docs/apis/nerdgraph/examples/manage-live-chart-urls-via-api)
* [Manage externally shared dashboards](/docs/apis/nerdgraph/examples/manage-live-chart-urls-via-api)
</td>
</tr>

Expand Down Expand Up @@ -366,4 +365,4 @@ The following are terms that originate with GraphQL, the API format NerdGraph us
</td>
</tr>
</tbody>
</table>
</table>
Loading

0 comments on commit 79e3018

Please sign in to comment.