Skip to content

DynamicTableWidget column displayType does not round-trip (int on GET, string required on create) #14

Description

@davidnmbond

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

  1. GET an existing dynamicTable widget (GetWidgetByIdAsync) — observe column displayType is an int.
  2. Zero the id and SaveNewWidgetAsync it to another dashboard.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions