• EnglishEspañol日本語한국어Português
  • Log inStart now

Nerdgraph: Create and manage dashboards

You can use our NerdGraph API to create and manage .

Overview

For an introduction to our custom dashboards feature, see the dashboards docs.

When using NerdGraph to configure dashboards, it helps to understand that our dashboards are considered entities, which have their own entity IDs, similar to other things we consider entities, like monitored apps, hosts, and services.

For how to add and configure widgets and charts in a dashboard, see Configure charts and other widgets.

Operations

We have defined a granular GraphQL API that lets you execute different dashboard operations depending on their goal and scope.

Dashboard CRUD operations

Here are operations related to creating, reading, updating, and deleting (CRUD).

Operation                GraphQL operation typeNotes
actor > entity()queryGet dashboard operation. You can get all dashboard and widget data for a given dashboard entity GUID.
dashboardCreate()mutationCreate dashboard operation. You can create a dashboard attached to a specific account by specifying all its elements, from metadata to widget configuration.
dashboardUpdate()mutationUpdate dashboard operation. You can update an existing dashboard given a dashboard entity GUID. You need to specify the complete, updated dashboard elements, from metadata to widget configuration.
dashboardDelete()mutationDelete dashboard operation. You can delete an existing dashboard given a dashboard entity GUID. This operation executes a logical delete that lets you recover your dashboard.
dashboardUndelete()mutationUndelete dashboard operation. You can recover a previously deleted dashboard given a dashboard entity GUID. Custom tags cannot be recovered.

Dashboard page operations

OperationGraphQL operation typeNotes
dashboardUpdatePage()mutationUpdate dashboard page operation. You can update one page of an existing dashboard given a dashboard page entity GUID. You need to specify the complete, updated dashboard page elements, from metadata to widget configuration.
dashboardUpdateWidgetsInPage()mutationUpdate widgets operation. You can update a set of existing widgets of a dashboard page given a dashboard page entity GUID. You need to specify the set of widgets to be updated and their complete configuration.
dashboardAddWidgetsToPage()mutationAdd widgets operation. You can add a set of new widgets to a dashboard page given a dashboard page entity GUID. You need to specify the set of new widgets and their complete configuration.

Other operations

OperationGraphQL operation typeNotes
dashboardCreateSnapshotUrl()mutationCreate dashboard page snapshot operation. You can create a public URL for a given dashboard page entity GUID. The dashboard page can then be accessed in the form of a static snapshot in the resulting public URL.
actor > dashboard > liveUrls()queryList all live URLs operation. You can get the complete list of live URLs you have access to. A live URL is a mechanism that allows you to share dashboard pages and widgets publicly with up-to-date or live data.
dashboardWidgetRevokeLiveUrl()mutationRevoke 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.

Cross-account dashboards

With NerdGraph, you can create queries of data from more than one New Relic account. You can also create a dashboard using data from across multiple accounts by adding account IDs to the accountIds array.

Here's an example of creating a cross-account dashboard:

Limits

We have limited the values you can set to some of the dashboard properties. This allows us to keep dashboards in good shape while boosting their usability.

Dashboard limits

LimitValue
Maximum number of pages in a dashboard25
Maximum length of a dashboard name255
Maximum length of a dashboard description1024

Dashboard page limits

LimitValue
Maximum number of widgets in a dashboard page150
Maximum length of a dashboard page name255
Maximum length of a dashboard page description1024

Widget limits

LimitValue
Maximum length of a widget title255
Maximum number of entities linked to a widget1
Maximum number of queries in a widget20
Maximum layout column of a widget12
Minimum layout column of a widget1
Minimum layout row of a widget1
Maximum layout width of a widget12
Minimum layout width of a widget1
Maximum layout height of a widget32
Minimum layout height of a widget1

Errors as first class citizens

All dashboard mutations offer a way to ask for errors when being executed. This means that you can perform your dashboard mutations and check the response in order to detect expected potential issues. Every error has a type and a description to help you identify what’s the source of the problem.

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.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.