feat(rmm): add PUT update routes for device-mappings and alert-rules #292
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-387-rmm-device-mapping-alert-rule-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
RMM device mappings and alert rules could be created and deleted but had no update endpoint, so an existing mapping or rule could only be edited by delete + recreate (losing its id and any references). Connections already expose PUT; this brings the two sibling sub-resources to parity.
Adds PUT /api/v1/rmm/device-mappings/{id} and PUT /api/v1/rmm/alert-rules/{id} with partial-update (COALESCE) semantics mirroring the connection update route: missing fields leave the existing column untouched, and rmm_connection_id is not editable (a mapping/rule belongs to the connection it was created under). Both routes keep the existing RequireRmm + RequireAdmin gating, validate the body, and return post-update state via new get_device_mapping / get_alert_rule fetch helpers.
#PMS-387
RMM device mappings and alert rules could be created and deleted but had no update endpoint, so an existing mapping or rule could only be edited by delete + recreate (losing its id and any references). Connections already expose PUT; this brings the two sibling sub-resources to parity. Adds PUT /api/v1/rmm/device-mappings/{id} and PUT /api/v1/rmm/alert-rules/{id} with partial-update (COALESCE) semantics mirroring the connection update route: missing fields leave the existing column untouched, and rmm_connection_id is not editable (a mapping/rule belongs to the connection it was created under). Both routes keep the existing RequireRmm + RequireAdmin gating, validate the body, and return post-update state via new get_device_mapping / get_alert_rule fetch helpers. #PMS-387