The Dashboards API allows you to create and manage dashboards.
Starting out with NerdGraph
If you're new to NerdGraph and GraphQL, you may want to first read our Introduction to NerdGraph. If you’re already familiar with the dashboards API, you can read Create dashboards with NerdGraph.
When using NerdGraph, it helps to understand that our dashboards are entities that report data from other entities, such as monitored apps, hosts and services.
Find the NerdGraph API explorer at api.newrelic.com/graphiql.
Operations
We have defined a granular GraphQL API that lets you execute different dashboard operations depending on their goal and scope.
Dashboard CRUD operations
Operation | GraphQL operation type | Notes |
---|---|---|
actor > entity() | query | Get dashboard operation. You can get all dashboard and widget data for a given dashboard entity GUID. |
dashboardCreate() | mutation | Create dashboard operation. You can create a dashboard attached to a specific account by specifying all its elements, from metadata to widget configuration. |
dashboardUpdate() | mutation | Update 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() | mutation | Delete 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() | mutation | Undelete dashboard operation. You can recover a previously deleted dashboard given a dashboard entity GUID. |
Dashboard page operations
Operation | GraphQL operation type | Notes |
---|---|---|
dashboardUpdatePage() | mutation | Update 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() | mutation | Update 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() | mutation | Add 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
Operation | GraphQL operation type | Notes |
---|---|---|
dashboardCreateSnapshotUrl() | mutation | Create 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() | query | List 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() | mutation | 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. |
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
Limit | Value |
---|---|
Maximum number of pages in a dashboard | 20 |
Maximum length of a dashboard name | 255 |
Maximum length of a dashboard description | 1024 |
Dashboard page limits
Limit | Value |
---|---|
Maximum number of widgets in a dashboard page | 100 |
Maximum length of a dashboard page name | 255 |
Maximum length of a dashboard page description | 1024 |
Widget limits
Limit | Value |
---|---|
Maximum length of a widget title | 255 |
Maximum number of entities linked to a widget | 1 |
Maximum number of queries in a widget | 20 |
Maximum layout column of a widget | 12 |
Minimum layout column of a widget | 1 |
Minimum layout row of a widget | 1 |
Maximum layout width of a widget | 12 |
Minimum layout width of a widget | 1 |
Maximum layout height of a widget | 32 |
Minimum layout height of a widget | 1 |
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.
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's and and documentation.