Process rules
put
https://oaainstall-host/risk-analyzer/risk/v1/processrulessecurely
Runs rules for a given session (request) and checkpoint.
Request
There are no request parameters for this operation.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
objectProcess rule request object
Show Source
-
checkpointList: array
checkpointList
List of checkpoints to be executed. Currently, only one checkpoint per request is supported.
-
contextMap: array
contextMap
additional context for rule evaluation.
-
extTransactionId: string
external transaction Id, used only when transactionId is null
-
requestId(required): string
requestId for the request
-
requestTime: string
(date-time)
Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6 e.g format 2021-08-13T01:29:29.768Z
-
transactionId: number
User Activity data Identifier created for this session
Nested Schema : checkpointList
Type:
arrayList of checkpoints to be executed. Currently, only one checkpoint per request is supported.
Show Source
Nested Schema : contextMap
Type:
arrayadditional context for rule evaluation.
Show Source
-
Array of:
object KeyValPair
Key-value pair which can be used generically.
Nested Schema : KeyValPair
Type:
objectKey-value pair which can be used generically.
Show Source
-
key(required): string
Key that can be used to fetch the related value.
-
value(required): object
value
associated value.
Nested Schema : value
Type:
objectassociated value.
Root Schema : schema
Type:
objectProcess rule request object
Show Source
-
checkpointList: array
checkpointList
List of checkpoints to be executed. Currently, only one checkpoint per request is supported.
-
contextMap: array
contextMap
additional context for rule evaluation.
-
extTransactionId: string
external transaction Id, used only when transactionId is null
-
requestId(required): string
requestId for the request
-
requestTime: string
(date-time)
Date time string in the format rfc3339 sec 5.6. https://tools.ietf.org/html/rfc3339#section-5.6 e.g format 2021-08-13T01:29:29.768Z
-
transactionId: number
User Activity data Identifier created for this session
Nested Schema : checkpointList
Type:
arrayList of checkpoints to be executed. Currently, only one checkpoint per request is supported.
Show Source
Nested Schema : contextMap
Type:
arrayadditional context for rule evaluation.
Show Source
-
Array of:
object KeyValPair
Key-value pair which can be used generically.
Nested Schema : KeyValPair
Type:
objectKey-value pair which can be used generically.
Show Source
-
key(required): string
Key that can be used to fetch the related value.
-
value(required): object
value
associated value.
Nested Schema : value
Type:
objectassociated value.
Response
Supported Media Types
- application/xml
- application/json
- text/plain
200 Response
Rules processed for the authentication context.
Root Schema : ProcessRiskResponse
Type:
objectReponse object for processed rules
Show Source
-
alertMessageList: array
alertMessageList
List of alerts as per the rules executed
-
allActions: array
allActions
List of actions.
-
apiRespone: object
ProcessRiskApiResponse
Rule api response for the process rule stating the request status
-
deviceId: number
Returns the associated Device Id.
-
result: string
This is the action to be taken. This action is the after applying the processing rule on the list of actions returned by the rule engine
-
resultMap: array
resultMap
Use this to get result of each requested checkpoint. Since there is one checkpoint per rule evaluation request, this field is not used.
-
runtimeType: integer
runtime type of the rule processed.
-
score: integer
Method to get the score after running the rules
-
statusResponse: object
StatusResponse
Status information for API call
-
transactionLogId: number
User Activity data Identifier provided in the input.
Nested Schema : ProcessRiskApiResponse
Type:
objectRule api response for the process rule stating the request status
Show Source
-
responseCode: string
status code of the request
-
responseMessage: string
response message related to the response code if needed.
Nested Schema : resultMap
Type:
arrayUse this to get result of each requested checkpoint. Since there is one checkpoint per rule evaluation request, this field is not used.
Show Source
-
Array of:
object KeyValPair
Key-value pair which can be used generically.
Nested Schema : StatusResponse
Type:
objectStatus information for API call
Show Source
-
responseCode: string
status code of the request
-
responseMessage: string
response message related to the response code if needed.
-
sessionId: string
session id of the authentcation.
-
status: boolean
authentication update request status
-
transactionId: number
transactionId in case of transaction data.
-
userData: object
SessionUserData
user related data
Nested Schema : KeyValPair
Type:
objectKey-value pair which can be used generically.
Show Source
-
key(required): string
Key that can be used to fetch the related value.
-
value(required): object
value
associated value.
Nested Schema : value
Type:
objectassociated value.
Nested Schema : SessionUserData
Type:
objectuser related data
Show Source
-
groupName(required): string
group name
-
loginName(required): string
Login name used for authentication
-
userId: string
user identifier.
400 Response
Invalid input
Root Schema : ProcessRiskApiResponse
Type:
objectRule api response for the process rule stating the request status
Show Source
-
responseCode: string
status code of the request
-
responseMessage: string
response message related to the response code if needed.
401 Response
Unauthorized
500 Response
Internal server error
503 Response
Service Unavailable
Examples
The following example shows a sample request and response for processing rules for a given session (request) and checkpoint.
cURL Command to Process Rules in JSON Format
curl --location --request PUT '<RISK>/risk-analyzer/risk/v1/processrulessecurely' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '{
"requestId":"96eb744b-b84e-4c13-8b78-06b64ad81d94",
"checkpointList": [
1600
],
"transactionId": 1,
"contextMap": [
{
"key": "Dummy",
"value": "Value"
}
]
}
}'Sample Response in JSON Format
{
"allActions": [
"Block"
],
"result": "Block",
"score": 1000,
"transactionLogId": 6,
"resultMap": [],
"alertMessageList": [
"sessActionMapId=279;loginId=testuser;userId=testuser;deviceId=85;ip=10.175.171.219;lastTransactionId=6;msg=Purchased Item Exceeds Limit"
],
"runtimeType": 1600,
"deviceId": 85,
"statusResponse": {
"responseCode": "0",
"responseMessage": "",
"status": true
}
}cURL Command to Process Rules in XML Format
curl --location --request PUT '<RISK>/risk-analyzer/risk/v1/processrulessecurely' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '
<?xml version="1.0" encoding="UTF-8"?>
<ProcessRiskRequest>
<requestId>96eb744b-b84e-4c13-8b78-06b64ad81d94</requestId>
<checkpointList>1600</checkpointList>
<transactionId>1</transactionId>
<contextMap>
<key>Dummy</key>
<value>Value</value>
</contextMap>
</ProcessRiskRequest>
'Sample Response in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ProcessRiskResponse> <allActions>Block</allActions> <result>Block</result> <score>1000</score> <transactionLogId>6</transactionLogId> <alertMessageList>sessActionMapId=279;loginId=testuser;userId=testuser;deviceId=85;ip=10.175.171.219;lastTransactionId=6;msg=Purchased Item Exceeds Limit</alertMessageList> <runtimeType>1600</runtimeType> <deviceId>85</deviceId> <statusResponse> <responseCode>0</responseCode> <responseMessage></responseMessage> <status>true</status> </statusResponse> </ProcessRiskResponse>