Skip to main content

Run Rule Draft

POST 

/api/v1/rules-v2/run

Run a stored rule, or a detection that has not been saved, writing nothing.

Give rule.name to run a stored rule, or one of rule.where_clause, rule.cel_filter, rule.user_sql, or rule.match to run that detection without creating a rule. The source is read the way a sample of it is read: its own table when that version is deployed, otherwise the landing table filtered to the source's match. The volume estimate and the SELECT of matching rows share the lookback window, and both are held to the orgs the caller may read. A detection the hunt runner would refuse, or a SELECT ClickHouse rejects, comes back with 200 and the reason in sql_errors.

The run returns source rows, so it also needs schema:read, as sample-rows does, and reads only the orgs both grants reach. 403 without it.

Request​

Responses​

Successful Response