---
title: Import, export, and add dashboards and charts
source: https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/dashboards-charts-import-export-data
---

You can use [dashboards](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards/) to visualize and track your system's health, tackle issues, and plan any further steps. Learn to share all that information with your team, customers, or other stakeholders with various import and export options.

## Import a dashboard as JSON [#import-json]

You can import a dashboard as JSON when you want to modify an out-of-the-box dashboard at the code level. For example, if you want to create a custom dashboard by merging two existing dashboards together, you can modify a base dashboard's JSON and then import it back to New Relic.

To import a dashboard as JSON:

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Dashboards**.

2.  Open an existing dashboard's JSON by clicking the **...** icon and selecting **Download dashboard**.

3.  Choose **JSON** from the format options and select **Copy to clipboard**.

4.  Go back to the **Dashboards** page.

5.  In the top-right corner, click **Import dashboard**.

6.  Paste your JSON code.

7.  Choose the account and permission settings for the dashboard. You can't change the account once you've set it, but you can [change the permissions](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/manage-your-dashboard/#dash-settings) at any time.

8.  Click **Save**.

## Export a dashboard [#export-dashboards-pdf]

To export a dashboard as a JSON, PDF, or PNG file:

1.  In the dashboard's top right corner, click the **...** icon and select **Download dashboard**.

2.  Choose **JSON**, **PDF**, or **PNG** as the output format.

3.  (Optional) For **PDF** or **PNG**, set the export width and height, in pixels. Both default to 1920 x 1080.

4.  Click **Download**.

New Relic doesn't support [custom visualizations](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/add-custom-visualizations-your-dashboards/) when exporting a dashboard as PDF or PNG via the UI.

To export as PDF or PNG with additional options such as template variable overrides and entity filters, use the [NerdGraph API](#export-api).

## Export dashboards and charts via NerdGraph API [#export-api]

Use the NerdGraph API to programmatically export dashboards and individual chart widgets as snapshot images. The API supports options not available in the UI, including custom dimensions, template variable overrides, and entity filters.

### Export a dashboard as PDF or PNG [#api-dashboard-snapshot]

The `dashboardCreateSnapshotUrl` mutation generates a snapshot URL for a full dashboard page.

> #### 💡 TIP
>
> The `guid` parameter requires the **page** GUID, not the dashboard GUID. A dashboard can have multiple pages. To find page GUIDs, use the `entitySearch` query or open the dashboard page and select **Manage JSON** from the **...** menu.
>
> ```graphql
> {
>   actor {
>     entitySearch(query: "parentId ='YOUR_DASHBOARD_GUID' AND tags.isDashboardPage = 'true'") {
>       results {
>         entities {
>           guid
>           name
>         }
>       }
>     }
>   }
> }
> ```

**Mutation schema:**

```graphql
mutation {
  dashboardCreateSnapshotUrl(
    guid: EntityGuid!
    params: SnapshotUrlInput
  ): String
}

input SnapshotUrlInput {
  timeWindow: SnapshotUrlTimeWindowInput
  display: SnapshotUrlDisplayInput
  variables: [SnapshotUrlVariableInput!]
  filter: String
  format: SnapshotUrlFormat
}

input SnapshotUrlTimeWindowInput {
  beginTime: EpochMilliseconds
  endTime: EpochMilliseconds
  duration: Milliseconds
}

input SnapshotUrlDisplayInput {
  width: Int
  height: Int
}

input SnapshotUrlVariableInput {
  name: String!
  values: [String!]!
}

enum SnapshotUrlFormat {
  PDF
  PNG
}
```

**Parameter reference:**

| Parameter                     | Type                          | Default                             | Description                                                 |
| ----------------------------- | ----------------------------- | ----------------------------------- | ----------------------------------------------------------- |
| `guid`                        | `EntityGuid!`                 | —                                   | Required. The entity GUID of the dashboard page.            |
| `params.timeWindow.beginTime` | `EpochMilliseconds`           | Dashboard's current time window     | Start of the data window (epoch ms).                        |
| `params.timeWindow.endTime`   | `EpochMilliseconds`           | Dashboard's current time window     | End of the data window (epoch ms).                          |
| `params.timeWindow.duration`  | `Milliseconds`                | —                                   | Relative time window, alternative to `beginTime`/`endTime`. |
| `params.display.width`        | `Int`                         | 1920                                | Width in pixels for the snapshot.                           |
| `params.display.height`       | `Int`                         | 1080                                | Height in pixels for the snapshot.                          |
| `params.variables`            | `[SnapshotUrlVariableInput!]` | Dashboard's current variable values | Pin specific values for dashboard template variables.       |
| `params.filter`               | `String`                      | No filter                           | NRQL-style entity filter applied at snapshot time.          |
| `params.format`               | `SnapshotUrlFormat`           | `PDF`                               | Output format: `PDF` or `PNG`.                              |

**Examples:**

**Basic export (PDF, default settings)**

````graphql
mutation {
  dashboardCreateSnapshotUrl(
    guid: "YOUR_DASHBOARD_PAGE_GUID"
  )
}
```

````

**Export as PNG with custom dimensions**

````graphql
mutation {
  dashboardCreateSnapshotUrl(
    guid: "YOUR_DASHBOARD_PAGE_GUID"
    params: {
      format: PNG
      display: {
        width: 1920
        height: 1080
      }
    }
  )
}
```

````

**Export with variable overrides and a filter**

Use this to pin specific variable values and filters into the snapshot, useful for scheduled report automation.

````graphql
mutation {
  dashboardCreateSnapshotUrl(
    guid: "YOUR_DASHBOARD_PAGE_GUID"
    params: {
      variables: [
        { name: "environment", values: ["production"] }
        { name: "region", values: ["us-east-1", "eu-west-1"] }
      ]
      filter: "env = 'production' AND service = 'checkout'"
    }
  )
}
```

````

> #### ⚠️ IMPORTANT
>
> Snapshot URLs are publicly accessible without authentication and expire after 3 months. Share them carefully in accordance with your organization's data policies.

### Get a chart image [#api-widget-snapshot]

The `dashboardWidgetCreateSnapshotUrl` mutation generates a PNG snapshot URL for a single chart widget. The widget doesn't need to exist on a dashboard — you can define it inline, which makes this useful for generating chart images programmatically.

**Mutation schema:**

```graphql
mutation {
  dashboardWidgetCreateSnapshotUrl(
    widget: DeclarativeUiWidget!
  ): WidgetSnapshotResult
}

type WidgetSnapshotResult {
  url: String!
}
```

The `widget` parameter accepts a `DeclarativeUiWidget` — a JSON object with three nested layers:

```
declarative/widget envelope
└── widget node        ← title and widget-level props
    └── visualization  ← visualization type and configuration
```

```json
{
  "type": "declarative/widget",
  "version": 1,
  "content": {
    "type": "widget",
    "props": {
      "title": "My Chart Title"
    },
    "content": {
      "type": "visualization",
      "id": "viz.line",
      "props": {
        // visualization-specific config (nrqlQueries, colors, thresholds, etc.)
      }
    }
  }
}
```

If you're building the widget definition from a dashboard you've exported as JSON, use this field mapping:

| Dashboard JSON field                | DeclarativeUiWidget field                          |
| ----------------------------------- | -------------------------------------------------- |
| `title`                             | `content.props.title`                              |
| `visualization.id`                  | `content.content.id`                               |
| `rawConfiguration.*`                | `content.content.props.*` (same field names)       |
| `layout`, `id`, `linkedEntityGuids` | Not included — not needed for standalone snapshots |

**Examples:**

**Export a line chart**

````graphql
mutation {
  dashboardWidgetCreateSnapshotUrl(
    widget: {
      version: 1
      type: "declarative/widget"
      content: {
        type: "widget"
        props: { title: "Throughput by environment" }
        content: {
          type: "visualization"
          id: "viz.line"
          props: {
            nrqlQueries: [
              {
                accountIds: [YOUR_ACCOUNT_ID]
                query: "SELECT count(*) FROM Transaction TIMESERIES"
              }
            ]
            legend: { enabled: true }
          }
        }
      }
    }
  ) {
    url
  }
}
```

````

**Export a billboard chart with thresholds**

````graphql
mutation {
  dashboardWidgetCreateSnapshotUrl(
    widget: {
      version: 1
      type: "declarative/widget"
      content: {
        type: "widget"
        props: { title: "Error rate" }
        content: {
          type: "visualization"
          id: "viz.billboard"
          props: {
            nrqlQueries: [
              {
                accountIds: [YOUR_ACCOUNT_ID]
                query: "SELECT percentage(count(*), WHERE error IS true) AS 'Error rate' FROM Transaction SINCE 1 hour ago"
              }
            ]
            thresholds: [
              { alertSeverity: "WARNING", value: 1 }
              { alertSeverity: "CRITICAL", value: 5 }
            ]
          }
        }
      }
    }
  ) {
    url
  }
}
```

````

> #### 💡 TIP
>
> The legacy `actor.account.nrql.staticChartUrl` field in NerdGraph remains available but doesn't support the latest visualization features such as thresholds, color formatting, and newer chart types. `dashboardWidgetCreateSnapshotUrl` is the recommended approach going forward.

> #### ⚠️ IMPORTANT
>
> `dashboardWidgetCreateSnapshotUrl` generates PNG image snapshot URLs. These are publicly accessible without authentication and expire after 3 months.

## Export a chart as CSV [#export-charts-csv]

To export a dashboard's table chart as a CSV file, in the chart's top right corner, click **...** and select **Export as CSV**.

![Screenshot of how to export a table chart as a CSV file](https://docs.newrelic.com/images/dashboards_screenshot-crop_export-csv.webp "Export chart as CSV")

## Query and explore charts [#explore-chart-data]

For details about what you can do with the charts, see [Querying and charting options](https://docs.newrelic.com/docs/new-relic-solutions/new-relic-one/ui-data/basic-ui-features/#data-analysis).
