Created
February 26, 2020 13:07
-
-
Save danielezonca/9210ac14bc145d8e041d108d59bd04ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[dzonca@dzonca proactive-fraud-detection-dmn-master]$ curl -u wbadmin:wbadmin -H "accept: application/json" -H "content-type: application/json" -X POST "http://localhost:8080/kie-server/services/rest/server/conainers/sample/dmn" -d "{ \"model-namespace\" : \"http://www.redhat.com/dmn/definitions/_81556584-7d78-4f8c-9d5f-b3cddb9b5c73\", \"model-name\" : \"fraud-scoring\", \"dmn-context\" : { \"Transactions\" : [{\"Auth Code\":\"Authorized\", \"Amount\":100, \"Merchant Code\":\"LEGITBIZ\", \"Card Type\":\"Debit\", \"Date\":\"2017-09-07T10:20:30\", \"Location\":\"Local\"}]}}" | |
{ | |
"type" : "SUCCESS", | |
"msg" : "OK from container 'sample'", | |
"result" : { | |
"dmn-evaluation-result" : { | |
"messages" : [ ], | |
"model-namespace" : "http://www.redhat.com/dmn/definitions/_81556584-7d78-4f8c-9d5f-b3cddb9b5c73", | |
"model-name" : "fraud-scoring", | |
"decision-name" : [ ], | |
"dmn-context" : { | |
"Transactions" : [ { | |
"Auth Code" : "Authorized", | |
"Amount" : 100, | |
"Merchant Code" : "LEGITBIZ", | |
"Card Type" : "Debit", | |
"Date" : "2017-09-07T10:20:30", | |
"Location" : "Local" | |
} ], | |
"Risk Rating for Blacklisted Marchant" : "function Risk Rating for Blacklisted Marchant( Marchant Code, Marchant Blacklist )", | |
"Risk Rating for Last Transaction Amount" : "function Risk Rating for Last Transaction Amount( Card Type, Location, Amount )", | |
"Risk Rating for Denied Transactions" : "function Risk Rating for Denied Transactions( Transactions )", | |
"Last Transaction" : { | |
"Auth Code" : "Authorized", | |
"Amount" : 100, | |
"Merchant Code" : "LEGITBIZ", | |
"Card Type" : "Debit", | |
"Date" : "2017-09-07T10:20:30", | |
"Location" : "Local" | |
}, | |
"Risk Score" : 0, | |
"Total Amount from Last 24 hours Transactions" : 0, | |
"Risk Rating for last 24 hours Transactions" : "function Risk Rating for last 24 hours Transactions( Card Type, Total Amount from Last 24 hours Transactions )", | |
"Marchant Backlist" : [ { | |
"Code" : "ILLICITCORP" | |
}, { | |
"Code" : "SLIMSHADY" | |
}, { | |
"Code" : "TAINTEDTHINGS" | |
}, { | |
"Code" : "UNSCRUPULOUS" | |
}, { | |
"Code" : "UNETHICALBIZ" | |
}, { | |
"Code" : "WECORRUPT" | |
}, { | |
"Code" : "WICKEDSTUFF" | |
}, { | |
"Code" : "VERYBADTHING" | |
} ] | |
}, | |
"decision-results" : { | |
"_c6e56793-68d0-4683-b34b-5e9d69e7d0d4" : { | |
"messages" : [ ], | |
"decision-id" : "_c6e56793-68d0-4683-b34b-5e9d69e7d0d4", | |
"decision-name" : "Risk Score", | |
"result" : 0, | |
"status" : "SUCCEEDED" | |
}, | |
"_859bea4f-dfc4-480e-96f2-1a756d54b84b" : { | |
"messages" : [ ], | |
"decision-id" : "_859bea4f-dfc4-480e-96f2-1a756d54b84b", | |
"decision-name" : "Total Amount from Last 24 hours Transactions", | |
"result" : 0, | |
"status" : "SUCCEEDED" | |
}, | |
"_d361c79e-8c06-4504-bdb2-d6b90b915166" : { | |
"messages" : [ ], | |
"decision-id" : "_d361c79e-8c06-4504-bdb2-d6b90b915166", | |
"decision-name" : "Last Transaction", | |
"result" : { | |
"Auth Code" : "Authorized", | |
"Amount" : 100, | |
"Merchant Code" : "LEGITBIZ", | |
"Card Type" : "Debit", | |
"Date" : "2017-09-07T10:20:30", | |
"Location" : "Local" | |
}, | |
"status" : "SUCCEEDED" | |
}, | |
"_ff34378e-fe90-4c58-9f7f-b9ce5767a415" : { | |
"messages" : [ ], | |
"decision-id" : "_ff34378e-fe90-4c58-9f7f-b9ce5767a415", | |
"decision-name" : "Marchant Backlist", | |
"result" : [ { | |
"Code" : "ILLICITCORP" | |
}, { | |
"Code" : "SLIMSHADY" | |
}, { | |
"Code" : "TAINTEDTHINGS" | |
}, { | |
"Code" : "UNSCRUPULOUS" | |
}, { | |
"Code" : "UNETHICALBIZ" | |
}, { | |
"Code" : "WECORRUPT" | |
}, { | |
"Code" : "WICKEDSTUFF" | |
}, { | |
"Code" : "VERYBADTHING" | |
} ], | |
"status" : "SUCCEEDED" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment