update_dashboard
Rename a dashboard or edit its metadata without re-uploading the body. Parameters, the rename pipeline, errors and scope rules.
Changes a dashboard's metadata, renames it, or both, without re-uploading the
body. A rename leaves the old URL working as a 301 redirect to the new canonical
one. To replace the body, use
publish_dashboard instead.
When you combine new_slug with metadata fields, both apply atomically.
Behaviour hints for clients: not read-only, idempotent, not open-world.
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
slug | string | yes | The dashboard's current canonical slug. |
new_slug | string | no | Rename target. Must differ from slug and not collide with another slug or alias of yours. |
name | string | no | Display name. Omit to preserve. Empty string is rejected. |
tags | array | no | Omit to preserve, [] to clear. |
chart | string | no | Omit to preserve. Empty string is rejected. |
visibility | string | no | public or private. Omit to preserve. |
workspace | string | no | Workspace slug. |
At least one of new_slug, name, tags, chart or visibility must be
provided.
The display name follows the URL by default
Passing new_slug without name auto-sets the name to the title-cased form of
the new slug, so quarterly-revenue becomes Quarterly Revenue. Pass name
explicitly to keep a custom label through a rename.
Returns
A rename reports both URLs:
Updated dashboard for mickey.
Renamed: marketing-dashboard -> quarterly-revenue
Dashboard URL: https://mickey.dashies.xyz/quarterly-revenue
Old URL (now 301 redirects): https://mickey.dashies.xyz/marketing-dashboard
Name: Quarterly Revenue
Visibility: public
Chart: bar
Tags: marketing, q2
A metadata-only edit reports the current state:
Updated dashboard for mickey.
Dashboard URL: https://mickey.dashies.xyz/quarterly-revenue
Name: Quarterly Revenue
Visibility: private
On a workspace target a line reading URL: https://<workspace>.dashies.xyz/<slug>
is appended.
Errors
Beyond the shared path and metadata rules:
| Condition | Text |
|---|---|
new_slug not a string | new_slug must be a string |
new_slug fails slug validation | new_slug invalid: <slug error> |
new_slug equals slug | new_slug must differ from slug |
| Nothing to change | at least one of new_slug, name, tags, chart, visibility must be provided |
| Reserved target | new_slug "<x>" is reserved - it would be shadowed by the app at https://<handle>.dashies.xyz/<x>; choose a different slug |
Rename failures tell you whether to retry
A rename is three steps: reserve the new slug, copy the bytes, then promote atomically. Each failure names where it stopped and whether retrying is safe.
| Text | What happened, and what to do |
|---|---|
rename rejected: <msg> | A permanent refusal such as a collision or a validation failure. Do not retry with the same arguments. |
rename reserve failed (no DB or R2 changes yet - safe to retry): <msg> | Nothing was touched. Retry. |
r2 copy failed (new_slug "<new>" remains reserved by this dashboard; retry to complete the rename, or pick a different new_slug): <err> | The name is claimed by this dashboard. Retry to finish, or choose another target to abandon it. |
db rename failed (reservation + R2 already in place; old URL still works - safe to retry): <msg> | The old URL is still serving. Retry. |
metadata update failed: <msg> | The metadata-only path failed. Nothing renamed. |
Retrying with the same arguments is safe by design: the reservation is idempotent, and a call that succeeded but whose response was lost is detected and returned as success on retry.
A rename invalidates a list cursor
This call bumps the row's updated_at, and
list_dashboards paginates on that
column. If you are walking pages and rename mid-walk, discard the cursor and
restart from a fresh first page, or you will skip the row you just changed.
Scope
Workspace-capable. The renamed URL is <workspace>.dashies.xyz/<new_slug> and
the old one 301-redirects.
Check it worked
Load the old URL. It should 301 to the new one rather than 404. Then run
list_dashboards and confirm the entry
shows the new slug and the name you expected, since a rename without an explicit
name rewrites the display name too.