You can export your dashboards and import them into a new account using queries and mutations in NerdGraph.
Dica
You can also export your as an image.
To do so:
- Go to the GraphiQL explorer.
- Find out which dashboards are available.
- Export the desired dashboard.
- Import the selected dashboard into a new account.
List your dashboards
Use the following query to retrieve a list of your existing dashboards:
{ actor { entitySearch(queryBuilder: {type: DASHBOARD}) { results { entities { ... on DashboardEntityOutline { guid name accountId } } } } }}
Export a dashboard
Use the following query to export, then extract the dashboard's entity information from the output:
{ actor { entity(guid: "your_guid_xxxxxxx") { ... on DashboardEntity { name permissions pages { name widgets { visualization { id } title layout { row width height column } rawConfiguration } } } } }}
Example entity information in GraphiQL output:
Import a dashboard into a new account
Use the following mutation to import the dashboard into another account:
mutation create($dashboard: DashboardInput!) { dashboardCreate(accountId: your_new_AccountID, dashboard: $dashboard) { entityResult { guid name } errors { description } }}
Follow these steps:
In the Query variables section, name the entity
dashboard
(since we declared the input variable as$dashboard
).Copy and paste the entity's output into the new account. It will be copied as an entity.
Change
entity
todashboard
.