Updates the rule in a policy

put

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

Request

Path Parameters
Supported Media Types
Request Body - application/xml ()
Root 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
Request Body - application/json ()
Root 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
Back to Top

Response

Supported Media Types

200 Response

Policy rule is updated.
Body ()
Root Schema : RuleResponse
Type: object
It contains information about the requested operation related to the policy rule.
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 : RuleResponse
Type: object
It contains information about the requested operation related to the policy rule.
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 updating the rule of a given policy.

cURL Command to Update the Rule of a Policy in JSON Format

curl --location --request PUT '<PolicyUrl>/oaa-policy/policy/v1/141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171/rule/146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '  {
    "name": "Factor and IP Range Rule",
    "status": "Active",
    "note": "Factor and IP Rule update",
    "conditionMap": [
        {
            "key": "IpGroupCondition",
            "value": {
                "mode": "BASIC",
                "expression": "context.ip.inRange('\''127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad'\'')",
                "values": [
                    "127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad"
                ],
                "isgroup": true,
                "attribute": "Context.IPAddress",
                "operator": "In Range"
            }
        }
    ],
    "results": {
        "action": "111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718",
        "score": 300,
        "weight": 100
    }
}'

Sample Response in JSON Format

{
    "status": "200",
    "message": "Rule updated successfully.",
    "rulegid": "146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a",
    "rule": {
        "name": "Factor and IP Range Rule",
        "rulegid": "146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a",
        "policygid": "141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171",
        "status": "ACTIVE",
        "note": "Factor and IP Rule update",
        "conditions": [
            {
                "conditionKey": "always_on_user.condition0",
                "conditionId": "145_5f7d4a93ac1ad362c70a43a9b64351cf6789b3a0c55b425145c374aca7628bc1",
                "parameters": [
                    {
                        "paramname": "isTrue",
                        "value": "true"
                    }
                ]
            }
        ],
        "conditionMap": [
            {
                "key": "IpGroupCondition",
                "value": {
                    "mode": "BASIC",
                    "expression": "context.ip.inRange(127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad)",
                    "values": [
                        "127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad"
                    ],
                    "isgroup": true,
                    "attribute": "Context.IPAddress",
                    "operator": "In Range"
                }
            }
        ],
        "results": {
            "action": "111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718",
            "score": 300,
            "weight": 100
        }
    }
}

cURL Command to Update the Rule of a Policy in XML Format

curl --location --request PUT '<PolicyUrl>/oaa-policy/policy/v1/141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171/rule/146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '  <?xml version="1.0" encoding="UTF-8" ?>
<RuleRequest>
	<name>Factor and IP Range Rule</name>
	<status>Active</status>
	<note>Factor and IP Rule update</note>
	<conditionMap>
		<key>IpGroupCondition</key>
		<value>
			<mode>BASIC</mode>
			<expression>context.ip.inRange('127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad')</expression>
			<values>127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad</values>
			<isgroup>true</isgroup>
			<attribute>Context.IPAddress</attribute>
			<operator>In Range</operator>
		</value>
	</conditionMap>
	<results>
		<action>111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718</action>
		<score>300</score>
		<weight>100</weight>
	</results>
</RuleRequest>'

Sample Response in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <RuleResponse>
     <status>200</status>
     <message>Rule updated successfully.</message>
     <rulegid>146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a</rulegid>
     <rule>
         <name>Factor and IP Range Rule</name>
         <rulegid>146_faef323e5ee26bac62d48a9bf9ded1da3f9655731566b0e3628ce86e21c9e46a</rulegid>
         <policygid>141_73875f1eda644e4196248e5ecc824364c5a6c1954350a9927942c6d50c4ed171</policygid>
         <status>ACTIVE</status>
         <note>Factor and IP Rule update</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.inRange(127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad)</expression>
                 <values>127_ddd32e7186d66b2cb96cc4608ded0bb7d6ae4a48b1fc1894c69e715cf262e7ad</values>
                 <isgroup>true</isgroup>
                 <attribute>Context.IPAddress</attribute>
                 <operator>In Range</operator>
             </value>
         </conditionMap>
         <results>
             <action>111_4141dd92a40fa2ff8d09153e62c658c67f3c7ac014ce89c0c103896230457718</action>
             <score>300</score>
             <weight>100</weight>
         </results>
     </rule>
 </RuleResponse>
Back to Top