7.2.3 Evaluate Rule

This topic describes about the Evaluate Rule.

Once the rule has been created the evaluate API has to be invoked to evaluate the rule.

To evaluate a rule, rule name & namespace are the mandatory parameters passed to the API and version of the rule is an optional parameter. If the version of the rule is not passed to the API then by default the latest version of the rule is evaluated.

The evaluate API url to be invoked is:

/rule-service/rules/evaluate/{namespace}/{ruleName}

Method: POST

Headers Required

appId: PLATORULE

userId: ASHISH

Content-Type: application/json

Request Body
{
    "LOAN_AMOUNT": "15001",
    "LOAN_TYPE":"Auto_loan",
}
Response
{
    "ruleEvaluated": true,
    "result": "true",
    "ruleId": 8161,
    "ruleName": "DIVYARULE1",
    "outputDescription": "null",
    "responseType": null,
    "error": null,
    "req_id": "reqId_1652082090755"
}