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
- 200
- 401
- 403
- 422
- default
Successful Response
No valid session: the credentials are missing, invalid or expired, or the account behind them is disabled or blocked
Refused: the session lacks the action this route checks, or its account must replace an issued password first. A SCIM route answers a refused action in the RFC 7644 error envelope
Validation Error
Problem details (RFC 9457)