Gets all rules in a policy

get

/oaa-policy/policy/v1/{policygid}/rule

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

201 Response

Policy rule is created
Body ()
Root Schema : AllRuleResponse
Type: object
Show Source
Nested Schema : rules
Type: array
All rules that belongs to the given policy.
Show Source
Nested Schema : schema
Type: object
Defines policy rule in the system
Show Source
Nested Schema : conditionMap
Type: array
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.
Show Source
  • 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: array
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.
Show Source
  • 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: object
Action to be returned when the rule is evaluated true.
Show Source
Nested Schema : ConditionMap
Type: object
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
Show Source
Nested Schema : value
Type: object
The value can be a json object or a simple string.
Nested Schema : Condition
Type: object
Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
Nested Schema : parameters
Type: array
List of all the overriding parameters.
Show Source
Nested Schema : ConditionParameter
Type: object
Parameter of a condition that is required when the condition is evaluated.
Show Source

401 Response

Unauthorized

405 Response

Invalid input
Body ()
Root Schema : AllRuleResponse
Type: object
Show Source
Nested Schema : rules
Type: array
All rules that belongs to the given policy.
Show Source
Nested Schema : schema
Type: object
Defines policy rule in the system
Show Source
Nested Schema : conditionMap
Type: array
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.
Show Source
  • 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: array
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.
Show Source
  • 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: object
Action to be returned when the rule is evaluated true.
Show Source
Nested Schema : ConditionMap
Type: object
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
Show Source
Nested Schema : value
Type: object
The value can be a json object or a simple string.
Nested Schema : Condition
Type: object
Conditions to be evaluated. If no parameter is provided then all the conditions will be evaluated with the default values.
Show Source
Nested Schema : parameters
Type: array
List of all the overriding parameters.
Show Source
Nested Schema : ConditionParameter
Type: object
Parameter of a condition that is required when the condition is evaluated.
Show Source

500 Response

Internal server error

503 Response

Service Unavailable
Back to Top

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>
Back to Top