writeDashboard
Writes or updates a Garmin training dashboard HTML page with recent weekly data, a digest for coach notes, and optional settings, while preserving existing layout and widgets.
Instructions
Writes the training dashboard page (default /garmin-dashboard.html) with the data of the
last weeks weeks, and returns its path and a short digest of the data (totals, weekly sums, load,
best efforts, races, strength top sets, HRV, recovery, fitness age, sync) for the coach notes.
An existing page keeps all its code, layout and widgets: only its data is replaced. A page from an
older template gets the new template and keeps its layout and widgets. Every page from the template
also gets the custom widgets of the widget library (/widgets.json), not placed on a board.
layout writes a new page
from the template: preset (the default widgets) or blank (empty boards). page writes your own
page code instead; it must contain /* garmin-data:start /null/ garmin-data:end */. A replaced
page is kept as .bak. notes: at most 5 plain-text coach notes; the server escapes them.
settings replace the page's settings (title, headline, sports, data to leave out, languages,
themes); without them the page keeps its own. The page holds only the data, languages and themes
they keep. pageLanguages in the result lists the languages of the page's Language menu, and
settings the settings that the page keeps. missingProfileLanguage is the language of the Garmin
profile when the page has no texts in it (it shows English); editDashboard languages adds it.
missingWidgetTexts lists the custom widgets that miss texts in a language of the page, with
those languages; editDashboard widgetTexts adds them.
preview: true writes nothing: it returns the digest, the activities of each board and the
settings of the page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Your own page code, with an empty garmin-data block, instead of the template | |
| path | No | The .html file; relative paths are inside the data dir | |
| notes | No | Coach notes, plain text; without notes the page has none | |
| weeks | No | Weeks to cover, default 12, max 52 | |
| layout | No | Write a new page from the template with this layout | |
| preview | No | Write nothing: return the digest, the activities of each board and the page settings | |
| settings | No | The page settings; replaces the page's own |