Deletes the policy

delete

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

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Policy is deleted
Body ()
Root Schema : PolicyResponse
Type: object
Show Source
Nested Schema : schema
Type: object
Policy object for creating, modifying and fetching policy.
Show Source

401 Response

Unauthorized

405 Response

Invalid input
Body ()
Root Schema : PolicyResponse
Type: object
Show Source
Nested Schema : schema
Type: object
Policy object for creating, modifying and fetching policy.
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 policy.

cURL Command to Delete a Policy in JSON Format

curl --location --request DELETE '<PolicyUrl>/oaa-policy/policy/v1/142_32c7815cfac3ff85bd90832315021aa98a66cfab2fd141e7ea7916d2e466f241' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>'

Sample Response in JSON Format

{
    "status": "200",
    "message": "Policy deleted successfully.",
    "policygid": "142_32c7815cfac3ff85bd90832315021aa98a66cfab2fd141e7ea7916d2e466f241",
    "policy": {
        "agentgid": "dede64d3-1d6a-42e9-89e1-714e88f8967c",
        "assuranceLevelId": "AssuranceLevel1",
        "name": "Policy2",
        "description": "Policy for AssuranceLevel1",
        "status": "ACTIVE",
        "scoringEngine": "Average",
        "weight": 100,
        "policygid": "142_32c7815cfac3ff85bd90832315021aa98a66cfab2fd141e7ea7916d2e466f241"
    }
}

cURL Command to Delete a Policy in XML Format

curl --location --request DELETE '<PolicyUrl>/oaa-policy/policy/v1/142_32c7815cfac3ff85bd90832315021aa98a66cfab2fd141e7ea7916d2e466f241' \
--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"?>
 <PolicyResponse>
     <status>200</status>
     <message>Policy deleted successfully.</message>
     <policygid>142_32c7815cfac3ff85bd90832315021aa98a66cfab2fd141e7ea7916d2e466f241</policygid>
     <policy>
         <agentgid>dede64d3-1d6a-42e9-89e1-714e88f8967c</agentgid>
         <assuranceLevelId>AssuranceLevel1</assuranceLevelId>
         <name>Policy2</name>
         <description>Policy for AssuranceLevel1</description>
         <status>ACTIVE</status>
         <scoringEngine>Average</scoringEngine>
         <weight>100</weight>
         <policygid>142_32c7815cfac3ff85bd90832315021aa98a66cfab2fd141e7ea7916d2e466f241</policygid>
     </policy>
 </PolicyResponse>
Back to Top