Open xcrzx opened 16 hours ago
Pinging @elastic/security-solution (Team: SecuritySolution)
Pinging @elastic/security-detections-response (Team:Detections and Resp)
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)
Summary
When sending a partial patch request for a rule, all type-specific rule parameters are ignored unless the
type
field is explicitly included in the request.Example of the Issue
Request That Doesn't Work:
In this case,
machine_learning_job_id
is not applied to the rule. An empty patch is applied instead, and no error is raised.Request That Works:
Including the
type
field allows the patch to work as expected.Root Cause
This happens because:
type
field, the system cannot validate type-specific fields likemachine_learning_job_id
Solution
The patch endpoint should: