Rule Attachments and Snapshots
Endpoints
POST /api/rules/:id/attachDELETE /api/rules/:id/attach/:linkIdGET /api/rules/:id/linksPOST /api/rules/backfill-snapshots
Access
rules:updatefor attach/detachrules:readfor linked linksrules:createfor snapshot backfill operation
Attach rule
POST /api/rules/:id/attach
Attaches an existing workspace rule to a target link.
Expected payload includes linkId (and optional priority metadata if supported by route validation).
Detach rule
DELETE /api/rules/:id/attach/:linkId
Detaches the rule from one link without deleting the rule.
Linked links list
GET /api/rules/:id/links
Returns link objects currently associated with the rule.
Snapshot backfill
POST /api/rules/backfill-snapshots
Administrative/maintenance endpoint for generating missing historical rule snapshots.
Useful after rule-system migrations or audit remediations.
Common errors
404: rule or link not found in workspace scope400: invalid attachment payload403: missing permission500: snapshot backfill failure

