Contents

Patch Page Widget

patch_page_widget · Tools · Pages

Change one widget on a page

Parameters

NameTypeRequiredDescription
configstringNoThe widget's complete new configuration, as JSON object text. Leave out to keep the current one.
expected_revisionintegerYesThe revision get_page returned for this board.
node_idstringYesThe widget's node id, as returned by get_page.
titlestringNoA heading for the widget. Leave out to keep the current one; send an empty string to remove it.
weightnumberNoHow much room the widget takes beside its siblings, 0.25 to 12. Leave out to keep the current one.

Changes one widget on a page, named by the node id get_page returns.

config replaces the widget's whole configuration rather than merging into it. That is deliberate: a Data View's configuration is a document whose arrays are its filters and columns, and a chart's are its filters and measures, and merging arrays cannot express removing one. Read the widget with get_page, change what you mean to change, and send the complete result.

The configuration is checked before anything is stored — against the widget's schema where it has one, and against the Data View document shape for a Data View. A widget nobody has described accepts whatever it is given.

expected_revision is the revision get_page returned. If the board moved in between — someone editing in the browser, or another run — the write is refused and names the current revision, so re-read and try again rather than overwriting work that landed while you were deciding.

An empty title removes the heading. Omitting a field leaves it alone; this tool is deliberately not strict, so an omitted field and an explicit null mean different things.