• /
  • Log in
  • Free account

Dashboards API

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

OperationGraphQL 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.

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.

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 dashboard20
Maximum length of a dashboard name255
Maximum length of a dashboard description1024

Dashboard page limits

LimitValue
Maximum number of widgets in a dashboard page100
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.

Create issueEdit page
Copyright © 2022 New Relic Inc.