add_widget
Add a widget to a LogicMonitor dashboard with type-specific configuration for text, bigNumber, cgraph, deviceSLA, and more.
Instructions
Add a widget to a dashboard (requires write permission). For text widgets: use 'content' (not 'html') as the config key. For bigNumber widgets: dataPoints need 'name' field, include 'bigNumberItems' array, colorThresholds use 'relation'/'threshold', aggregateFunction is lowercase (e.g., 'average'). For cgraph widgets: deviceDisplayName/deviceGroupFullPath/instanceName must be GlobMatchToggle objects {'value': '...', 'isGlob': true}, dataPoints need 'display' object, graphInfo needs 'aggregate': false when using topX. For deviceSLA widgets: required config fields are 'groupName' (not deviceGroupFullPath), 'deviceName', 'dataSourceFullName', 'metric', 'threshold'. Also required: 'daysInWeek' (e.g., '1,2,3,4,5,6,7'), 'periodInOneDay' (e.g., '0:00-23:59'), 'displayType' (0=availability, 1=timeline), 'calculationMethod' (0=percent, 1=actual), 'unmonitoredTimeAlertStatus' (0=ignore, 1=warning, 2=error, 3=critical).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| row | No | Start row. Omit to append below existing widgets. | |
| name | Yes | Widget name | |
| config | No | Widget configuration (type-specific). Merged into the request payload. | |
| col_span | No | Width in columns, 1-12 (default 6 when a position is set). | |
| row_span | No | Height in rows (default 1 when a position is set). | |
| description | No | Widget description | |
| widget_type | Yes | Widget type (cgraph, sgraph, bigNumber, text, html, alert, noc, gauge, pieChart, table, etc.) | |
| column_index | No | Start column, 1-12. Omit to let the portal auto-place the widget below existing widgets. | |
| dashboard_id | Yes | Dashboard ID |