Deletes the rule from the policy.

delete

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

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Policy rule is deleted.
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 deleting a rule from the policy.

cURL Command to Delete a Rule from the Policy in JSON Format

curl --location --request DELETE '<PolicyUrl>/oaa-policy/policy/v1/296_1002a0512b7458875b47481bd5bbed3d09e741543ad583dccb7348e8b4a0522e/rule/301_593fbf2846d3ac696d451ce989a308cd06dc6b47f9e22b390d864d80fa1d14eb' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>'

Sample Response in JSON Format

{
    "status": "200",
    "message": "Rule Deleted.",
    "rulegid": "301_593fbf2846d3ac696d451ce989a308cd06dc6b47f9e22b390d864d80fa1d14eb",
    "rule": {
        "name": "AssuranceLevel2",
        "rulegid": "301_593fbf2846d3ac696d451ce989a308cd06dc6b47f9e22b390d864d80fa1d14eb",
        "policygid": "296_1002a0512b7458875b47481bd5bbed3d09e741543ad583dccb7348e8b4a0522e",
        "ruleversion": null,
        "status": "ACTIVE",
        "note": "2",
        "transactiongid": null,
        "conditions": null,
        "conditionMap": [
            {
                "key": "1",
                "value": {
                    "mode": "BASIC",
                    "expression": "context.ip.inRange('239_8d2b04fe80fcf0a3a543783eb64c710b4713a2fa7a6fe5727c892d4350e7b72b')",
                    "values": [
                        "239_8d2b04fe80fcf0a3a543783eb64c710b4713a2fa7a6fe5727c892d4350e7b72b"
                    ],
                    "isgroup": false,
                    "attribute": "Context.IPAddress",
                    "operator": "In Range"
                }
            }
        ],
        "results": {
            "action": "297_4269a2c419e02f5825186893cc63ef2443214a6f3fc46dbe65e5ee1891c1bf53",
            "alert": null,
            "score": 1000,
            "weight": 100
        }
    }
}

cURL Command to Delete a Rule from the Policy in XML Format

curl --location --request DELETE '<PolicyUrl>/oaa-policy/policy/v1/296_1002a0512b7458875b47481bd5bbed3d09e741543ad583dccb7348e8b4a0522e/rule/301_593fbf2846d3ac696d451ce989a308cd06dc6b47f9e22b390d864d80fa1d14eb' \
--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" ?>
 <RuleResponse>
     <status>200</status>
     <message>Rule Deleted.</message>
     <rulegid>301_593fbf2846d3ac696d451ce989a308cd06dc6b47f9e22b390d864d80fa1d14eb</rulegid>
     <rule>
         <name>AssuranceLevel2</name>
         <rulegid>301_593fbf2846d3ac696d451ce989a308cd06dc6b47f9e22b390d864d80fa1d14eb</rulegid>
         <policygid>296_1002a0512b7458875b47481bd5bbed3d09e741543ad583dccb7348e8b4a0522e</policygid>
         <ruleversion></ruleversion>
         <status>ACTIVE</status>
         <note>2</note>
         <transactiongid></transactiongid>
         <conditions></conditions>
         <conditionMap>
             <key>1</key>
             <value>
                 <mode>BASIC</mode>
                 <expression>context.ip.inRange('239_8d2b04fe80fcf0a3a543783eb64c710b4713a2fa7a6fe5727c892d4350e7b72b')</expression>
                 <values>239_8d2b04fe80fcf0a3a543783eb64c710b4713a2fa7a6fe5727c892d4350e7b72b</values>
                 <isgroup>false</isgroup>
                 <attribute>Context.IPAddress</attribute>
                 <operator>In Range</operator>
             </value>
         </conditionMap>
         <results>
             <action>297_4269a2c419e02f5825186893cc63ef2443214a6f3fc46dbe65e5ee1891c1bf53</action>
             <alert></alert>
             <score>1000</score>
             <weight>100</weight>
         </results>
     </rule>
 </RuleResponse>
Back to Top