Skip to main content
POST
Test a rule against past transactions

Authorizations

X-API-Key
string
header
required

Path Parameters

rule_id
string<uuid>
required

Identifies the rule. Primary key

Body

dateFrom
string<date-time> | null

Only transactions created at or after this instant are tested

dateTo
string<date-time> | null

Only transactions created at or before this instant are tested

limit
integer
default:100

How many matching ids to collect for the sample, 1-1000

Required range: 1 <= x <= 1000

Response

200 - application/json
ruleType
enum<string>
required

Always VELOCITY; absent from the SINGLE-rule response shape

  • SINGLE - Single
  • VELOCITY - Velocity
  • BEHAVIOURAL - Unusual behaviour
Available options:
SINGLE,
VELOCITY,
BEHAVIOURAL
windowSeconds
integer
required

Rolling window the metric was aggregated over

threshold
number<double>
required

Value the metric is compared against

comparator
enum<string>
required

How metric meets threshold

  • >= - >=
  • > - >
  • <= - <=
  • < - <
Available options:
>=,
>,
<=,
<
groupBy
string | null
required

First grouping field, for single-field rules

groupByFields
string[]
required

Every grouping field, in order

matchedEntities
integer
required

Count of violating entities — a number, not the entities. Drawn from the 500 most recent transactions in the window, so a busier window is sampled rather than fully scanned

hits
object[]
required

Up to 50 violating entities; matched_entities is not truncated to this