Skip to main content

Update Rule

PUT 

/api/v1/rules/:name

Replace a detection rule (re-runs creation pipeline, preserves created_at).

The replacement is written as SQL, a where_clause or a condition, as on create, and a rule replaced with SQL or a WHERE no longer carries a condition. With no source in the body the stored one stands, read as the registered source its table names when it names none. A source the body sets or changes must be registered, and SQL on a registered source must read its table. A stored source no longer registered is not checked, so the rule stays editable.

A replacement the hunt runner could not compile is refused with 422 and the stored rule is left as it was. A production+team write is routed to a review branch instead of the branch the runner git-syncs, and the X-DFE-Review-Required header says so.

Request​

Responses​

Successful Response