Export dashboards as PDF/PNG using the API

Do you need to schedule reports that contain charts or dashboards? Do you want to automate how you share dashboards? You can obtain your dashboards as PDF or PNG files programmatically with a GraphQL mutation.

Export single-page dashboards

If your dashboard has a single page:

  1. Obtain the dashboard's GUID: Click the [info icon] icon by the dashboard's name to access the See metadata and manage tags modal and see the dashboard's GUID.
  2. Run the dashboardCreateSnapshotURL mutation in the NerdGraphQL explorer with the GUID as a parameter.
  3. Get the link to retrieve your dashboard as a PDF. The link looks similar to https://gorgon.nr-assets.net/image/e0c22263-2d88-40bc-940a-b885dbc1d98d?...
  4. Configure the exported file, if necessary.

Export multiple-page dashboards

For dashboards with multiple pages, first you need to obtain the GUID for each individual page:

  1. Obtain the parent GUID (that is, the GUID in the See metadata and manage tags modal).
  2. Get the individual pages' GUIDs using the query below:
    {
     actor {
        entitySearch(query: "parentId ='YOUR_PAGE_GUID'") {
          results {
            entities {
              guid
              name
              ... on DashboardEntityOutline {
                guid
                name
                dashboardParentGuid
              }
            }
          }
        }
      }
    }
  3. Run the mutation for each page to get the PDF for all dashboards.

Configure the file you retrieve

Edit the returned link to change the format of your export (PDF or PNG), or resize it.

For example, if you obtain the link https://gorgon.nr-assets.net/image/e0c22263-2d88-40bc-940a-b885dbc1d98d?...PDF&width=2000&height=2000

  • Substitute PDF for PNG to get an image.
  • Modify the width and height fields to adjust the size to your needs. The maximum value is 2000.

For more help

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