Skip to main content

Create Rule

POST 

/api/v1/rules-v2

Create a detection rule from one detection form.

The rule stores that detection and nothing about a source or a hunt. A hunt names the rules it runs and the table they read. A full user_sql query is reduced to its WHERE, and a match is compiled to one. A filter that does not transpile, or a detection the hunt runner would refuse, is 422 and nothing is written.

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