Gets all rules in a policy
get
/oaa-policy/policy/v1/{policygid}/rule
Request
Path Parameters
-
policygid(required): string
Identifier of the policy
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
- application/json
201 Response
Policy rule is created
Root Schema : AllRuleResponse
Type:
Show Source
object-
message: string
Message related to the status of the request.
-
policygid: string
Global id of policy for which the request is sent.
-
rules: array
rules
All rules that belongs to the given policy.
-
status: string
Status of the request
Nested Schema : rules
Type:
arrayAll rules that belongs to the given policy.
Show Source
-
Array of:
object schema
Defines policy rule in the system
Nested Schema : schema
Type:
objectDefines policy rule in the system
Show Source
-
conditionMap: array
conditionMap
Map of key value pair for reconstruction of UI rule. Required elements for the OAA rules are entityRefId, operation, values (Array of String), expression, mode, isgroup.
-
conditions: array
conditions
Array of conditions to be evaluated when the rule will be executed. All the condition must be true to return the action associated with the rule.
-
name(required): string
Name of the rule.
-
note: string
Note (if any) for the rule
-
policygid(required): string
Global id of the policy. Policy id may not be required when rule definition is part of policy definition result
-
results(required): object
RuleAction
Action to be returned when the rule is evaluated true.
-
rulegid: string
Global unique identifier of the rule.
-
status: string
Active or Disabled
-
transactiongid: string
Unique id of the transaction to be used for the rule evaluation which is then checked using filter conditions
Nested Schema : conditionMap
Type:
arrayMap of key value pair for reconstruction of UI rule. Required elements for the OAA rules are entityRefId, operation, values (Array of String), expression, mode, isgroup.
Show Source
-
Array of:
object ConditionMap
Map of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Nested Schema : conditions
Type:
arrayArray of conditions to be evaluated when the rule will be executed. All the condition must be true to return the action associated with the rule.
Show Source
-
Array of:
object Condition
Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Nested Schema : RuleAction
Type:
objectAction to be returned when the rule is evaluated true.
Show Source
-
action: string
Action group name
-
alert: string
Alert group name
-
score: integer
Score returned by the rule
-
weight: integer
Weight if the score if there are multiple rules in the context.
Nested Schema : ConditionMap
Type:
objectMap of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Show Source
-
key: string
-
value: object
value
The value can be a json object or a simple string.
Nested Schema : value
Type:
objectThe value can be a json object or a simple string.
Nested Schema : Condition
Type:
objectConditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
-
conditionId: string
The global identifier of the condition which can be used to update the condition inside a rule.
-
conditionKey(required): string
Unique key of the condition. May be repeated for multiple conditions of same type.
-
parameters: array
parameters
List of all the overriding parameters.
-
remove: boolean
Remove the condition from the rule. It is optional.
Nested Schema : parameters
Type:
arrayList of all the overriding parameters.
Show Source
-
Array of:
object ConditionParameter
Parameter of a condition that is required when the condition is evaluated.
Nested Schema : ConditionParameter
Type:
objectParameter of a condition that is required when the condition is evaluated.
Show Source
-
operations: string
Operation performed on the key. The operation may not be required
-
paramname: string
Key to be used for the operation
-
scope: string
Filter condition. One of Value or Current. The scope is not required.
-
value: string
Value to be matched based on the scope.
401 Response
Unauthorized
405 Response
Invalid input
Root Schema : AllRuleResponse
Type:
Show Source
object-
message: string
Message related to the status of the request.
-
policygid: string
Global id of policy for which the request is sent.
-
rules: array
rules
All rules that belongs to the given policy.
-
status: string
Status of the request
Nested Schema : rules
Type:
arrayAll rules that belongs to the given policy.
Show Source
-
Array of:
object schema
Defines policy rule in the system
Nested Schema : schema
Type:
objectDefines policy rule in the system
Show Source
-
conditionMap: array
conditionMap
Map of key value pair for reconstruction of UI rule. Required elements for the OAA rules are entityRefId, operation, values (Array of String), expression, mode, isgroup.
-
conditions: array
conditions
Array of conditions to be evaluated when the rule will be executed. All the condition must be true to return the action associated with the rule.
-
name(required): string
Name of the rule.
-
note: string
Note (if any) for the rule
-
policygid(required): string
Global id of the policy. Policy id may not be required when rule definition is part of policy definition result
-
results(required): object
RuleAction
Action to be returned when the rule is evaluated true.
-
rulegid: string
Global unique identifier of the rule.
-
status: string
Active or Disabled
-
transactiongid: string
Unique id of the transaction to be used for the rule evaluation which is then checked using filter conditions
Nested Schema : conditionMap
Type:
arrayMap of key value pair for reconstruction of UI rule. Required elements for the OAA rules are entityRefId, operation, values (Array of String), expression, mode, isgroup.
Show Source
-
Array of:
object ConditionMap
Map of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Nested Schema : conditions
Type:
arrayArray of conditions to be evaluated when the rule will be executed. All the condition must be true to return the action associated with the rule.
Show Source
-
Array of:
object Condition
Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Nested Schema : RuleAction
Type:
objectAction to be returned when the rule is evaluated true.
Show Source
-
action: string
Action group name
-
alert: string
Alert group name
-
score: integer
Score returned by the rule
-
weight: integer
Weight if the score if there are multiple rules in the context.
Nested Schema : ConditionMap
Type:
objectMap of key-value pair which is used to reconstruct the rule or any additional parameters that are required by the rule can be passed in the map
Show Source
-
key: string
-
value: object
value
The value can be a json object or a simple string.
Nested Schema : value
Type:
objectThe value can be a json object or a simple string.
Nested Schema : Condition
Type:
objectConditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
-
conditionId: string
The global identifier of the condition which can be used to update the condition inside a rule.
-
conditionKey(required): string
Unique key of the condition. May be repeated for multiple conditions of same type.
-
parameters: array
parameters
List of all the overriding parameters.
-
remove: boolean
Remove the condition from the rule. It is optional.
Nested Schema : parameters
Type:
arrayList of all the overriding parameters.
Show Source
-
Array of:
object ConditionParameter
Parameter of a condition that is required when the condition is evaluated.
Nested Schema : ConditionParameter
Type:
objectParameter of a condition that is required when the condition is evaluated.
Show Source
-
operations: string
Operation performed on the key. The operation may not be required
-
paramname: string
Key to be used for the operation
-
scope: string
Filter condition. One of Value or Current. The scope is not required.
-
value: string
Value to be matched based on the scope.
500 Response
Internal server error
503 Response
Service Unavailable
Examples
The following example shows a sample request and response for retrieving all policy rules that are associated with a given policy name.
cURL Command to Retrieve all Policy Rules for a Policy Name in JSON Format
curl --location --request GET '<PolicyUrl>/oaa-policy/policy/v1/141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171/rule' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>'
Sample Response in JSON Format
{
"status": "200",
"message": "Rules information.",
"rules": [
{
"name": "Factor and IP Rule",
"rulegid": "146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a",
"policygid": "141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171",
"status": "ACTIVE",
"note": "Factor and IP Rule",
"conditions": [
{
"conditionKey": "always_on_user.condition0",
"conditionId": "145_5f7d4a93ac1ad362c70a43a9b64351cf6789b3a0c55b425145c374aca7628bc1",
"parameters": [
{
"paramname": "isTrue",
"value": "true"
}
]
}
],
"conditionMap": [
{
"key": "IpGroupCondition",
"value": {
"mode": "BASIC",
"expression": "context.ip.inGroup(113_91d0cc32aecf15d094e3953b17a7dd904a3fb71d2f4152934efb56caa898796b)",
"values": [
"113_91d0cc32aecf15d094e3953b17a7dd904a3fb71d2f4152934efb56caa898796b"
],
"isgroup": true,
"attribute": "Context.IPAddress",
"operator": "In Group"
}
}
],
"results": {
"action": "111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718",
"score": 300,
"weight": 100
}
}
]
}cURL Command to Retrieve all Policy Rules for a Policy Name in XML Format
curl --location --request GET '<PolicyUrl>/oaa-policy/policy/v1/141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171/rule' \ --header 'Content-Type: application/xml' \ --header 'Accept: application/xml' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>'
Sample Response in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AllRuleResponse>
<status>200</status>
<message>Rules information.</message>
<rules>
<name>Factor and IP Rule</name>
<rulegid>146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a</rulegid>
<policygid>141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171</policygid>
<status>ACTIVE</status>
<note>Factor and IP Rule</note>
<conditions>
<conditionKey>always_on_user.condition0</conditionKey>
<conditionId>145_5f7d4a93ac1ad362c70a43a9b64351cf6789b3a0c55b425145c374aca7628bc1</conditionId>
<parameters>
<paramname>isTrue</paramname>
<value>true</value>
</parameters>
</conditions>
<conditionMap>
<key>IpGroupCondition</key>
<value>
<mode>BASIC</mode>
<expression>context.ip.inGroup(113_91d0cc32aecf15d094e3953b17a7dd904a3fb71d2f4152934efb56caa898796b)</expression>
<values>113_91d0cc32aecf15d094e3953b17a7dd904a3fb71d2f4152934efb56caa898796b</values>
<isgroup>true</isgroup>
<attribute>Context.IPAddress</attribute>
<operator>In Group</operator>
</value>
</conditionMap>
<results>
<action>111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718</action>
<score>300</score>
<weight>100</weight>
</results>
</rules>
</AllRuleResponse>