Skip to main content

system.mes.dashboard.saveDashboard

Description

Creates or updates a Dashboard in the system based on the provided parameters.

Syntax

system.mes.dashboard.saveDashboard(**dashboard)

Parameters

ParameterTypeNullableDescription
nameStringFalseThe user-given name for the dashboard.
urlStringFalseURL-friendly version used for page routing.
isPublicBooleanFalseTrue if the dashboard is public.
usernameStringTrueOwner’s Ignition username (null if public).
iconPathStringTruePath to an icon for the dashboard.
packBooleanFalseWhen true, sizes to fit content; otherwise uses fixed grid settings.
gridStringFalseGrid layout mode (e.g., STRETCH).
rowCountIntegerFalseNumber of grid rows (fixed layout).
columnCountIntegerFalseNumber of grid columns (fixed layout).
rowGutterSizeIntegerFalseVertical spacing between rows (fixed layout).
columnGutterSizeIntegerFalseHorizontal spacing between columns (fixed layout).
instancesJsonStringFalseJSON for Perspective dashboard component props.instances.
idString (ULID)TrueThe ULID of the dashboard (optional, for updates).
notesStringTrueNotes related to the dashboard.
enabledBooleanTrueIndicates if the dashboard is active and enabled.
spare1StringTrueAdditional field for user-defined context.
spare2StringTrueAdditional field for user-defined context.
spare3StringTrueAdditional field for user-defined context.

Returns

Returns a JSON representation of the saved dashboard.

Code Examples

db = system.mes.dashboard.newDashboard()
db['name'] = 'Production Overview'
db['url'] = 'production-overview'
db['instancesJson'] = '[]'
saved = system.mes.dashboard.saveDashboard(**db)
print(saved)