Deletes the rule from the policy.
delete
/oaa-policy/policy/v1/{policygid}/rule/{ruleid}
Request
Path Parameters
-
policygid(required): string
Id of the policy
-
ruleid(required): string
Id of the rule
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
- application/json
200 Response
Policy rule is deleted.
Root Schema : RuleResponse
Type:
object
It contains information about the requested operation related to the policy rule.
Show Source
-
message: string
Message related to the status of the request.
-
rule: object
schema
Defines policy rule in the system
-
rulegid: string
Global identifier of the rule.
-
status: string
Status of the request to indicate success or failure.
Nested Schema : schema
Type:
object
Defines 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:
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
-
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:
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
-
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:
object
Action 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:
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
-
key: string
-
value: object
value
The value can be a json object or a simple string.
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
-
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:
array
List 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:
object
Parameter 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 : RuleResponse
Type:
object
It contains information about the requested operation related to the policy rule.
Show Source
-
message: string
Message related to the status of the request.
-
rule: object
schema
Defines policy rule in the system
-
rulegid: string
Global identifier of the rule.
-
status: string
Status of the request to indicate success or failure.
Nested Schema : schema
Type:
object
Defines 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:
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
-
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:
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
-
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:
object
Action 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:
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
-
key: string
-
value: object
value
The value can be a json object or a simple string.
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
-
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:
array
List 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:
object
Parameter 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 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>