Rule Instance - Create

POST
/rule-instances

Create Rule Instance

POST /rule-instances endpoint is used to create a new rule instance. A rule instance can be thought of as a live entity, that runs checks for for transactions. Rule instances use Rule templates as the blueprint.

Every rule instance has an associated ruleId of the rule from which it is derived. The details of the rule and the required parameters is found by GET /rules endpoint.

Once a rule instance is created, flagright generates an ID for the rule instance and also stores related metadata like:

  • id - unique identifier for the rule instance
  • runCount - how many times the rule instance was run
  • hitCount - how many times a rule was hit
  • createdAt & updatedAt - timestamps

They are generated and maintained by the flagright system and are not updatable by the API.

Request

This endpoint expects an object.
ruleIdstringOptional
alertCreationOnHitbooleanOptional
filtersmap from strings to anyOptional

Rule filters. A key-value json object corresponding to the json schema returned by /rule-filters-schema endpoint.

parametersmap from strings to anyOptional
ruleNameAliasstringOptional
riskLevelParametersobjectOptional
actionenumOptional
Allowed values: ALLOWFLAGBLOCKSUSPEND

Model for rule action if a rule is hit. This is returned in the API response and can be configured on Console by operational accounts like a Compliance Analyst

riskLevelActionsobjectOptional
triggersOnHitobjectOptional
riskLevelsTriggersOnHitobjectOptional
status"ACTIVE" or "INACTIVE"Optional
Allowed values: ACTIVEINACTIVE
casePriorityenumOptional
Allowed values: P1P2P3P4

Response

This endpoint returns an object.
idstring
typeenum
Allowed values: TRANSACTIONUSERUSER_ONGOING_SCREENING
ruleIdstring
checksForlist of strings
runCountdoubleOptional
hitCountintegerOptional
createdAtdoubleOptional
updatedAtdoubleOptional
alertCreationOnHitbooleanOptional
filtersmap from strings to anyOptional

Rule filters. A key-value json object corresponding to the json schema returned by /rule-filters-schema endpoint.

parametersmap from strings to anyOptional
ruleNameAliasstringOptional
riskLevelParametersobjectOptional
actionenumOptional
Allowed values: ALLOWFLAGBLOCKSUSPEND

Model for rule action if a rule is hit. This is returned in the API response and can be configured on Console by operational accounts like a Compliance Analyst

riskLevelActionsobjectOptional
triggersOnHitobjectOptional
riskLevelsTriggersOnHitobjectOptional
status"ACTIVE" or "INACTIVE"Optional
Allowed values: ACTIVEINACTIVE
casePriorityenumOptional
Allowed values: P1P2P3P4

Errors

Built with