Summary
DynamicTableWidget column displayType cannot be round-tripped: a widget fetched via GET serializes each column's displayType as an integer (e.g. 4, 5), but the create endpoint (POST /dashboard/widgets) rejects the body with:
column<0>: displayType must be raw or percent or colorBar
So deserializing a fetched dynamicTable widget and re-creating it (clone) fails. Editing the JSON to a string value ("colorBar") doesn't help because the value is dropped/normalised back to the int during the typed round-trip.
Repro
- GET an existing
dynamicTable widget (GetWidgetByIdAsync) — observe column displayType is an int.
- Zero the id and
SaveNewWidgetAsync it to another dashboard.
- Server returns HTTP 400
displayType must be raw or percent or colorBar.
Expected
The column displayType should serialize on the write path as the string enum the API expects (raw/percent/colorBar), so a GET→POST clone round-trips. Likely fix: model DynamicTableWidgetColumn.DisplayType as a string-backed enum (with a converter) rather than a bare int, or map it on write.
Impact
- Discovered while building dashboard/widget management in the
logicmonitor skill (panoramicdata/PanoramicData.Skills). Every other widget type (text, alert, bigNumber, cgraph, gauge, netflow, pieChart, noc, deviceSLA, html, gmap) clones and re-creates fine via GET→POST; only dynamicTable fails.
- Read/list/get/update of existing dynamic tables is unaffected.
Version: LogicMonitor.Api 3.240.10.
Summary
DynamicTableWidgetcolumndisplayTypecannot be round-tripped: a widget fetched via GET serializes each column'sdisplayTypeas an integer (e.g.4,5), but the create endpoint (POST /dashboard/widgets) rejects the body with:So deserializing a fetched
dynamicTablewidget and re-creating it (clone) fails. Editing the JSON to a string value ("colorBar") doesn't help because the value is dropped/normalised back to the int during the typed round-trip.Repro
dynamicTablewidget (GetWidgetByIdAsync) — observe columndisplayTypeis an int.SaveNewWidgetAsyncit to another dashboard.displayType must be raw or percent or colorBar.Expected
The column
displayTypeshould serialize on the write path as the string enum the API expects (raw/percent/colorBar), so a GET→POST clone round-trips. Likely fix: modelDynamicTableWidgetColumn.DisplayTypeas a string-backed enum (with a converter) rather than a bare int, or map it on write.Impact
logicmonitorskill (panoramicdata/PanoramicData.Skills). Every other widget type (text, alert, bigNumber, cgraph, gauge, netflow, pieChart, noc, deviceSLA, html, gmap) clones and re-creates fine via GET→POST; onlydynamicTablefails.Version: LogicMonitor.Api 3.240.10.