• /
  • Log in
  • Free account

Insights Dashboard API

Do not use the Insights Dashboards API. Instead, use the New Relic One Dashboards API with NerdGraph, our GraphQL API.

End of life notice

The Insights Dashboard API reaches end of life in 2021.

  • As of July 28, 2021, the CREATE and UPDATE endpoints are not available.
  • As of August 30, 2021, the GET and DELETE endpoints are not available.

To make the transition from the Insights Dashboard API to the New Relic One Dashboards API, see our migration guide. For more information, see the NerdGraph dashboards tutorial and Explorers Hub post.

Requirements

If your account hosts data in the EU data center, ensure you're using the proper API endpoints for EU region accounts.

Overview

The Insights Dashboard API allows you to list, create, read, update, and delete new or existing dashboards. New Relic's API Explorer includes the cURL request format, available parameters, response status codes, and JSON response structure for available API calls.

Example use cases

The Insights Dashboard API is a flexible solution for many different use cases. Here are a few examples of how you can leverage the Dashboard API to solve problems:

  • Automatically create dashboards for new teams or services pre-populated with standard organization metrics and charts.
  • Use the API to view dashboard schemas, and save them in a central repository for source control and backups.
  • Create widget and dashboard templates to allow teams to self-service.

Account and data security

The Dashboard API includes safeguards to help ensure account and data security.

Requirements

Comments

User key and permissions

Required: This API requires a user key. You cannot use your account-level REST API key to manage dashboards.

Cross-account widgets

You can view cross-account widgets on a dashboard by using the Insights or New Relic One dashboards UI. However, the ability to view cross-account widgets when using the Dashboard API has these restrictions:

  • To view the list of widgets on a specific dashboard with the Dashboard API, you must use the SHOW endpoint.

  • To view a widget in the API payload, the widget's account ID must be the same as the account ID for the payload.

    If the account ID is not the same, the widget's details will not be listed. Instead, the widget's payload will show:

    "visualization": "inaccessible"

Use the API Explorer

To view the Dashboard API options in the API Explorer:

  1. Log in to your New Relic account.
  2. Go to rpm.newrelic.com/api/explore.
  3. From the API Explorer's Select an account and key dropdown, select a user key.
  4. Select Dashboards, then select the API function.
  5. To use API functions with existing dashboards, include the dashboard id. To find the dashboard id, select the LIST endpoint, and apply filtering options.

View Dashboard API video

Follow along with this step-by-step tutorial to learn how to find your API keys, create new dashboards, view and update existing dashboards via the REST API.

For a step-by-step guide to using the New Relic API Explorer to manage Insights dashboards, watch this video (approximately 6 minutes). Or, go directly to the full online course about New Relic APIs.

Use API endpoints

The API supports the following functions for Insights dashboards only. The API does not support these functions for data apps (collections of linked dashboards).

API endpoints

Comments

CREATE

POST /v2/dashboards

Create a new dashboard.

The API permits a maximum of 300 widgets when creating or updating a dashboard. Attempting to POST more than 300 widgets will produce an error.

To add more widgets to the dashboard, use the Insights UI.

UPDATE

PUT /v2/dashboards/:id:

Update an existing dashboard for the dashboard id.

The API permits a maximum of 300 widgets when creating or updating a dashboard. Attempting to PUT more than 300 widgets will produce an error.

To add more or edit existing widgets on the dashboard, use the Insights UI.

SHOW

GET /v2/dashboards/:id:

View an existing dashboard and all accessible widgets for the dashboard id.

To help ensure data security, the SHOW function returns only the dashboard widgets that the user has permission to view. If a dashboard includes widgets that the user is not authorized to view, the API will provide a placeholder with the visualization field set to inaccessible.

LIST

GET /v2/dashboards?page=:page:&per_page=:count:

View a paginated list of dashboards. The list shows filterable dashboard metadata only; no widgets will appear in the list.

Search options include:

  • filter[title] as substring search

  • filter[category] (all / favorites / mine}

  • filter[created_after] as ISO date

  • filter[created_before] as ISO date

  • filter[updated_after] as ISO date

  • filter[updated_before] as ISO date

    Sort options include:

  • name

  • recently_viewed

  • last_edited

    If no sort option is provided, results will be ordered by id.

    Pagination options include the page and per_page fields. The per_page field controls the number of results per page with a default and maximum of 100 results. The response will include a pagination Link header, which provides next page and last page links.

DELETE

DELETE /v2/dashboards/:id:

Delete an existing dashboard indicated by the dashboard id.

Dashboard API schema

JSON is the only supported format. When using API functions, be sure to add .json to the end of the request URL, as shown in the API Explorer.

Important

Widgets have a size limit of 3x3 (height and width may not exceed 3).

Caution

The Dashboard API 3-column restriction also applies to the dashboards you upload to New Relic One dashboards. If you update a dashboard with a different layout using the API, the uploaded dashboard will revert to the 3-column configuration.

Dashboard data definitions

For examples of these data elements being used in a JSON call, see the Dashboard API schema.

Dashboard data element

Description

metadata

Object

Specifies the version of the dashboard schema. The version must be 1.

icon

String

Name of an icon from the Insights icon library.

grid_column_count

Integer

Specifies the number of columns in the grid layout.

title

String

User-supplied title of the dashboard.

filter

Object

Specifies configuration of the smart filter on the dashboard.

visibility

String

Specifies who can view the dashboard in the Insights UI and the API.

editable

String

Specifies who can edit the dashboard in the Insights UI and the API.

widgets

Array

Array of widget data element objects.

Widget data definitions

For examples of these data elements being used in a JSON call, see the Dashboard API schema.

Widget data element

Description

visualization

String

What sort of visualization to place in the widget; for example, billboard, line_chart, area chart, etc.

data

Array

Array of objects with chart-specific information needed to query necessary data. Currently only one data object is supported.

account_id

Long

Source account to fetch data from, if not the current account.

presentation

Object

Object with chart title and notes, plus chart-specific customization.

layout

Object

Object with column, row, width, and height to determine chart layout in the dashboard.

Supported visualizations

The Dashboard API supports:

event_table
line_chart
facet_table
facet_bar_chart
facet_pie_chart
billboard
faceted_area_chart
faceted_line_chart
event_table
comparison_line_chart
heatmap
histogram
billboard_comparison
attribute_sheet
funnel
gauge
json
list

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.