ktm dashboards edit-widget
Use ktm dashboards edit-widget to replace a widget's data from a JSON file or stdin while keeping its type unchanged.
Replace a widget's data from a JSON file or stdin
Usage
ktm dashboards edit-widget <uid> <widget-id> [flags]
Examples
# Edit widget from file
ktm dashboards edit-widget abc123 RandomID-xxx --json widget.json
# Pipe from stdin
cat updated.json | ktm dashboards edit-widget abc123 RandomID-xxx --json -
Arguments
| Argument | Required |
|---|---|
uid | Yes |
widget-id | Yes |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | string | Widget JSON file path, or "-" for stdin (required) |
Details
Update a widget's data section in a dashboard.
Provide the full updated data section as JSON (same format as add-widget). The widget is identified by its ID within the dashboard layout.
The widget type cannot be changed — only data within the same type. Validation runs before the update; placeholder values are rejected.
customDisplay: script changes must follow the IIFE pattern and 20KB limit. Always show the full updated script to the user before applying.
Related
Global flags (--output, --debug, --host, …) apply to every command. See the command reference overview.
What's next?
Last updated on