Skip to main content

DashboardMutations

No description

type DashboardMutations {
createDashboard(
name: String!
description: String!
folderId: Long
): DashboardDetail
updateDashboard(
publicId: String!
ops: String!
expectedVersion: Int!
validateOnly: Boolean
): DashboardUpdateResult
deleteDashboard(
publicId: String!
): Boolean
saveDashboardChart(
queryHandle: String!
name: String!
description: String
viz: String!
folderId: Long
): DashboardChartDetail
updateDashboardChart(
publicId: String!
expectedVersion: Int!
name: String
description: String
queryHandle: String
viz: String
): DashboardChartUpdateResult
deleteDashboardChart(
publicId: String!
): DashboardChartDeleteResult
setDashboardFolder(
publicId: String!
folderId: Long
): Boolean
setDashboardChartFolder(
publicId: String!
folderId: Long
): Boolean
assignDashboardTag(
publicId: String!
tagId: Long!
): Boolean
unassignDashboardTag(
publicId: String!
tagId: Long!
): Boolean
assignDashboardChartTag(
publicId: String!
tagId: Long!
): Boolean
unassignDashboardChartTag(
publicId: String!
tagId: Long!
): Boolean
setDashboardAnnotation(
source: String!
table: String!
column: String
description: String!
): DashboardAnnotationDetail
}

Fields​

DashboardMutations.createDashboard ● DashboardDetail object​

Create an empty dashboard. Requires canManageDashboards.

DashboardMutations.createDashboard.name ● String! non-null scalar​

Title, required

DashboardMutations.createDashboard.description ● String! non-null scalar​

Description, required: it is what the list shows and what Barry reads first

DashboardMutations.createDashboard.folderId ● Long scalar​

DashboardMutations.updateDashboard ● DashboardUpdateResult object​

Edit a dashboard with ops, applied in one transaction and validated as a whole. Requires canManageDashboards.

DashboardMutations.updateDashboard.publicId ● String! non-null scalar​
DashboardMutations.updateDashboard.ops ● String! non-null scalar​

JSON array of ops applied in order, each {"op": ...}: add_tile {chartPublicId, x, y, w, h, tileId?, titleOverride?}, remove_tile {tileId}, move_tile {tileId, x, y, w, h}, set_filter {filter}, remove_filter {filterId}, link_filter {tileId, filterId, param}, unlink_filter {tileId, filterId}, rename {name}, set_description {description}, set_settings {settings: {autoApplyFilters}}, set_note {note: {noteId, x, y, w, h, markdown, align?, verticalAlign?, card?}} (add or replace), move_note {noteId, x, y, w, h}, remove_note {noteId}.

DashboardMutations.updateDashboard.expectedVersion ● Int! non-null scalar​

The version last read; a stale one returns outcome conflict

DashboardMutations.updateDashboard.validateOnly ● Boolean scalar​

Validate the result and write nothing

DashboardMutations.deleteDashboard ● Boolean scalar​

Delete a dashboard and its tiles; its charts stay in the library. Requires canManageDashboards.

DashboardMutations.deleteDashboard.publicId ● String! non-null scalar​

DashboardMutations.saveDashboardChart ● DashboardChartDetail object​

Save the query a runDashboardAdhoc handle proved as a chart in the library. Requires canManageDashboards.

DashboardMutations.saveDashboardChart.queryHandle ● String! non-null scalar​

From runDashboardAdhoc: the chart's source, SQL and parameters are taken from it

DashboardMutations.saveDashboardChart.name ● String! non-null scalar​
DashboardMutations.saveDashboardChart.description ● String scalar​
DashboardMutations.saveDashboardChart.viz ● String! non-null scalar​

Chart config JSON (chart-viz.schema.json), validated against the handle's columns

DashboardMutations.saveDashboardChart.folderId ● Long scalar​

DashboardMutations.updateDashboardChart ● DashboardChartUpdateResult object​

Update a chart's name, description, config or (through a fresh queryHandle) query. Refused while a dashboard links a filter to a parameter the new query drops. Requires canManageDashboards.

DashboardMutations.updateDashboardChart.publicId ● String! non-null scalar​
DashboardMutations.updateDashboardChart.expectedVersion ● Int! non-null scalar​

The version last read; a stale one returns outcome conflict

DashboardMutations.updateDashboardChart.name ● String scalar​
DashboardMutations.updateDashboardChart.description ● String scalar​
DashboardMutations.updateDashboardChart.queryHandle ● String scalar​

A new query: run it with runDashboardAdhoc and pass the handle. The only way to change the SQL, parameters or source.

DashboardMutations.updateDashboardChart.viz ● String scalar​

A new chart config JSON

DashboardMutations.deleteDashboardChart ● DashboardChartDeleteResult object​

Delete a chart; refused (deleted=false, usedBy) while any dashboard tile uses it. Requires canManageDashboards.

DashboardMutations.deleteDashboardChart.publicId ● String! non-null scalar​

DashboardMutations.setDashboardFolder ● Boolean scalar​

File a dashboard in a dashboard folder (null: unfiled). Requires canManageDashboards.

DashboardMutations.setDashboardFolder.publicId ● String! non-null scalar​
DashboardMutations.setDashboardFolder.folderId ● Long scalar​

A dashboard folder; null moves it out of any folder

DashboardMutations.setDashboardChartFolder ● Boolean scalar​

File a chart in a chart folder (null: unfiled). Requires canManageDashboards.

DashboardMutations.setDashboardChartFolder.publicId ● String! non-null scalar​
DashboardMutations.setDashboardChartFolder.folderId ● Long scalar​

A chart folder; null moves it out of any folder

DashboardMutations.assignDashboardTag ● Boolean scalar​

Tag a dashboard (a dashboard-scope tag). Requires canManageDashboards.

DashboardMutations.assignDashboardTag.publicId ● String! non-null scalar​
DashboardMutations.assignDashboardTag.tagId ● Long! non-null scalar​

DashboardMutations.unassignDashboardTag ● Boolean scalar​

Untag a dashboard. Requires canManageDashboards.

DashboardMutations.unassignDashboardTag.publicId ● String! non-null scalar​
DashboardMutations.unassignDashboardTag.tagId ● Long! non-null scalar​

DashboardMutations.assignDashboardChartTag ● Boolean scalar​

Tag a chart (a chart-scope tag). Requires canManageDashboards.

DashboardMutations.assignDashboardChartTag.publicId ● String! non-null scalar​
DashboardMutations.assignDashboardChartTag.tagId ● Long! non-null scalar​

DashboardMutations.unassignDashboardChartTag ● Boolean scalar​

Untag a chart. Requires canManageDashboards.

DashboardMutations.unassignDashboardChartTag.publicId ● String! non-null scalar​
DashboardMutations.unassignDashboardChartTag.tagId ● Long! non-null scalar​

DashboardMutations.setDashboardAnnotation ● DashboardAnnotationDetail object​

Write (or, with an empty description, remove) the note on a table or column of a source. Returns the annotation, null when removed. Requires canManageDashboards.

DashboardMutations.setDashboardAnnotation.source ● String! non-null scalar​

Source JSON, as dashboardSources returns it

DashboardMutations.setDashboardAnnotation.table ● String! non-null scalar​

The table (schema.table or its name)

DashboardMutations.setDashboardAnnotation.column ● String scalar​

The column; omit for a note on the table

DashboardMutations.setDashboardAnnotation.description ● String! non-null scalar​

The note, at most 1000 characters; empty removes the annotation

Returned By​

dashboards mutation