Skip to main content
On this page

Kater CLI Present and share dashboard

kater dashboard edit

Changes a dashboard by what you did to it, not by the whole file.

Give the commands in the order to apply them and the revision you opened. The server works out the dashboard’s file, so the same commands leave the same file whoever sends them: a section labelled Sales (EU) is named sales_eu, and a new tab holds what the page’s command gives it. The commands are one change in the dashboard’s history: the answer names it in change, and kater undo takes it back. The command refuses the change when the dashboard changed after you opened it, and nothing is written. kater dashboard save stays for a whole file that you wrote.

Examples

Terminal window
# Keep the ad_reporting dashboard in a file
kater dashboard open connections/snowflake_prod_connection/workspaces/ad_reporting --json > ad_reporting_open.json
# Make a request that adds a section and a tab
jq '{expected_revision: .revision, commands: [{type: "add-section", label: "Sales (EU)"}, {type: "add-tab"}]}' ad_reporting_open.json > ad_reporting_edit.json
# Apply both commands as one change
kater dashboard edit connections/snowflake_prod_connection/workspaces/ad_reporting --request-file ad_reporting_edit.json

Arguments

ArgumentDescription
<object>Optional. The workspace: its key, such as duckdb_sample/shop, or in a person’s folder, duckdb_sample/users/<user id>/shop; its name, such as shop; its folder, such as connections/<connection>/workspaces/shop; or its id, rel1_…, also from before a rename. By default the workspace you are in.

Options

OptionDescription
--request-file <file>The commands and the revision you opened, as JSON. Give - to read it from standard input. See The request.

It also takes the global options anywhere on the line, and --help.

The request

FieldWhat it holds
commandsWhat was done, each one an object whose type says which, applied in order. The dashboard is checked after the last one.
expected_revisionThe dashboard’s revision from kater dashboard open.
undoesFor an undo that keeps some of what the changes did: the changes it takes back, newest first. commands are the ones that stay.

The commands

typeWhat it does
add-tile, remove-tile, resize-tilePut a chart or a query’s table on the board, take a tile off, or give a tile a width and a height by name, as kater dashboard tiles add, remove and resize do.
add-text, set-text, set-text-cardPut a text on the board, change a text’s words, or draw it on a card or as plain words.
put-tile, drop-tile, size-tilePut a tile at a place among a section’s tiles, drop a tile into a row or an open place of the board, or give a tile the width in columns and the height in pixels a person dragged it to. The server works out the places and sizes of the tiles around it.
add-section, rename-section, move-section, remove-sectionAdd a section with a heading, change a heading, move a section among the sections, or delete one, its tiles joining another section or leaving the dashboard.
move-to-section, move-to-tab, move-tile, duplicate-tileMove a tile to a section, a tab or a region of the template, or copy its place for another chart.
change-template, set-fieldPut the dashboard on another template, with no tile leaving it, or set a field of the file, such as title.
add-tab, rename-tab, remove-tab, reorder-tabsAdd a tab, change a tab’s label, remove a tab with its tiles going to the first tab left, or put the tabs in another order.

The answer holds the dashboard’s file, its problems, the revision, the change and before_text, the file as it was before.

See also