feat(rmm): add PUT update routes for device-mappings and alert-rules #292

Merged
David merged 2 commits from feat/PMS-387-rmm-device-mapping-alert-rule-update into main 2026-06-17 12:26:38 +02:00
Owner

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
feat(rmm): add PUT update routes for device-mappings and alert-rules
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m18s
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 3m25s
Integration / integration tests (pull_request) Successful in 10m23s
ada540ca48
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
Merge branch 'main' into feat/PMS-387-rmm-device-mapping-alert-rule-update
Some checks failed
Create release / Create release from merged PR (pull_request) Has been skipped
E2E / Playwright against staging (pull_request) Successful in 1m11s
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 2m15s
Integration / integration tests (pull_request) Failing after 2m43s
42acff8e35
David merged commit 91a42cdc1b into main 2026-06-17 12:26:38 +02:00
David deleted branch feat/PMS-387-rmm-device-mapping-alert-rule-update 2026-06-17 12:26:38 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!292
No description provided.