Rule - List

GET

Rules List

GET /rules endpoint returns a lot of all rule templates supported by flagright. You can use GET /rules/{ruleId} endpoint to fetch the details of any particular rule.

Each rule is identified by the unique id which is of the form R-{X} where X is an integer.

Rules have a parametersSchema which is a JSON Schema that contains the schema of the parameters supported by the rule. When you create a ruleInstance, you need to provide the values in accordance with the parametersSchema.

All the rules come with default values for all required attributes.

Rules come with default name, description. Each rule may take multiple rule parameters, by default they have a defaultParameters attribute that contains all the required fields. For use cases where the rule parameters are forked based on customer dynamic risk score, defaultRiskLevelParameters are set.

Rules also come with a defaultAction and defaultRiskLevelActions for rule actions for the rule.

All of the above should be configured at the rule instance level when creating a rule instance. Rules are read only and provided by flagright. You can only manipulate rules instances, not rule templates themselves.

If you need an update to a rule or a new rule, you can always contact the Flagright team.

Response

This endpoint returns a list of objects
id
string
type
enum
Allowed values: TRANSACTIONUSERUSER_ONGOING_SCREENING
name
string
types
list of strings
description
string
defaultParameters
map from strings to any
defaultAction
enum
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
Allowed values: ALLOWFLAGBLOCKSUSPEND
labels
list of enums
defaultCasePriority
enum
Allowed values: P1P2P3P4
defaultNature
enum
Allowed values: AMLFRAUDCTFSCREENING
checksFor
list of strings
typologies
list of strings
sampleUseCases
string
parametersSchema
map from strings to anyOptional
defaultRiskLevelParameters
objectOptional
defaultRiskLevelActions
objectOptional
GET
1curl https://sandbox.api.flagright.com/management/rules \
2 -H "x-api-key: <apiKey>"
200
Retrieved
1[
2 {
3 "id": "R-1",
4 "type": "TRANSACTION",
5 "name": "First payment by customer",
6 "types": [
7 "types"
8 ],
9 "description": "First Payment by customer",
10 "defaultParameters": {
11 "defaultParameters": {
12 "key": "value"
13 }
14 },
15 "defaultAction": "FLAG",
16 "labels": [
17 "UNEXPECTED_BEHAVIOR"
18 ],
19 "defaultCasePriority": "P1",
20 "defaultNature": "AML",
21 "checksFor": [
22 "checksFor"
23 ],
24 "typologies": [
25 "typologies"
26 ],
27 "sampleUseCases": "sampleUseCases",
28 "parametersSchema": {
29 "parametersSchema": {
30 "key": "value"
31 }
32 },
33 "defaultRiskLevelParameters": {
34 "VERY_HIGH": {},
35 "HIGH": {},
36 "MEDIUM": {},
37 "LOW": {},
38 "VERY_LOW": {}
39 },
40 "defaultRiskLevelActions": {
41 "VERY_HIGH": "FLAG",
42 "HIGH": "FLAG",
43 "MEDIUM": "FLAG",
44 "LOW": "FLAG",
45 "VERY_LOW": "FLAG"
46 }
47 }
48]