Contents

Add Page Widget

add_page_widget · Tools · Pages

Place a widget on a page

Parameters

NameTypeRequiredDescription
configstringNoThe widget's configuration as JSON object text. Leave out for a widget that takes none.
expected_revisionintegerYesThe revision get_page returned.
route_slugstringYesThe board page's route slug.
titlestringNoA heading for the widget.
weightnumberNoHow much room it takes beside its siblings, 0.25 to 12. Defaults to 1.
widget_typestringYesA widget type from list_widget_types.

Places a widget at the end of a board page.

widget_type must be one list_widget_types names. A type nothing declares is refused here, even though the REST API lets one through — a client newer than the server is a real situation, but an agent naming a widget that does not exist has invented it, and the result would be a gap on the page.

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, so copy an existing one of that type rather than guessing.

Returns the new node id, which is how patch_page_widget names it later.