Visuals and dashboards both read from saved Explorer queries. Create the query first with
create_explorer_query: an ephemeral run_sql_query result can’t back a chart. See SQL & queries.Available tools
Visuals
A visual belongs to a query.spec.type selects the variant, and the remaining fields depend on that type.
Types: chart, value, table, pie, sankey, treemap, scatter, map, chord.
1
Load the schema
Call
get_skill(name="explorer-visuals") for general guidance, then get_skill(name="explorer-visuals", reference_title="<type>") for that type’s exact JSON schema.2
Create the visual
create_explorer_visual returns a visual_id and the visual’s URL. Pass an existing visual_id to replace that visual in place, and omit it to add a new one.get_explorer_query returns a query’s visuals list. Use those IDs with get_explorer_visual, delete_explorer_visual, or the visual_id argument of share_explorer_query.
Editing a visual requires edit access to its parent query.
Dashboards
A dashboard is a tree: dashboard > page > section > element.set_dashboard upserts or deletes any node in that tree, and the ID path you pass locates the target.
You always pass the ID path down to the target’s parent. Adding the target’s own ID updates that node, and leaving it out creates a new one.
config.type covers the visualization types above plus layout and control elements: markdown, spacer, variable-select, switch, date-range, and radio-group. Call get_skill(name="dashboard-design") for the build order and element catalog, then get_skill(name="dashboard-design", reference_title="<config.type>") for a type’s full schema.
Reading a dashboard
read_dashboard returns the node you target plus summaries of its immediate children, and it never returns a whole subtree.
Pass exactly one of
dashboard_id or share_id.
Reading a share link
To read a public share link, pass itsshare_id in place of dashboard_id. The share_id is the last segment of https://app.allium.so/s/dashboard/{share_id}. The page_id, section_id, and element_id drill-down is the same.
- A share read returns the dashboard structure only. It does not return SQL or query results.
- The root view of a share read includes the
share_id. - A missing or revoked share returns
Share '<SHARE_ID>' not found. A share of a query or a visual returns an error.
A share link is read-only. To edit the dashboard with
set_dashboard, you need its dashboard_id and edit access to the dashboard.Deleting
delete_dashboard takes a dashboard_id only and removes the whole dashboard. To remove a page, section, or element, call set_dashboard with spec: null and that node’s ID path.
Sharing
Related resources
SQL & queries
Create the saved queries that back your charts
Skills
Fetch the exact spec schema for every visual and element type
Dashboards in Allium App
Build visuals and dashboards by hand in Allium App
Terminal dashboards
Start from an analyst-built baseline