Skip to main content

Create Rule

POST 

/api/v1/rules

Create a new hunt rule via RuleCreationService.

The service sanitizes the SQL, applies CEL->SQL transpilation, validates column references, and optionally estimates query cost. A rule whose SQL the hunt runner could not compile is refused with 422. The cost preview counts only the orgs the hunts running the rule read, cut to the orgs its author may read.

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