Updates the policy for Policy Browser
put
/policy/risk/v1/policies/{policygid}
Policy Browser is intended for migration customers who wishes to see the old policies created in their system. If they wish to update any attributes of those policies this API can be used.
Request
Path Parameters
-
policygid(required): string
Identifier of the policy.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
object
Policy object for creating, modifying and fetching policy.
Show Source
-
agentgid(required): string
Identifier of the agent to which the policy belongs
-
assuranceLevelId(required): string
Identifier of the assurance level which is associated with the policy
-
description(required): string
Policy description.
-
name(required): string
Policy Name.
-
policygid: string
Identifier of the policy
-
scoringEngine: string
Engine used for scoring the policy (Aggregated, Average, Maximum, Minimum, Weighted Average, Weighted Maximum, Weighted Minimum)
-
status(required): string
Status of the policy. It can be one of the following values. Active, Disabled or Deleted.
-
weight: integer
Number between 0 to 100 to define the weight of the policy if there are multiple policies in the assurance level.
Root Schema : schema
Type:
object
Policy object for creating, modifying and fetching policy.
Show Source
-
agentgid(required): string
Identifier of the agent to which the policy belongs
-
assuranceLevelId(required): string
Identifier of the assurance level which is associated with the policy
-
description(required): string
Policy description.
-
name(required): string
Policy Name.
-
policygid: string
Identifier of the policy
-
scoringEngine: string
Engine used for scoring the policy (Aggregated, Average, Maximum, Minimum, Weighted Average, Weighted Maximum, Weighted Minimum)
-
status(required): string
Status of the policy. It can be one of the following values. Active, Disabled or Deleted.
-
weight: integer
Number between 0 to 100 to define the weight of the policy if there are multiple policies in the assurance level.
Response
Supported Media Types
- application/xml
- application/json
201 Response
Policy is updated
Root Schema : PolicyResponse
Type:
Show Source
object
-
message: string
Message related to the status of the request
-
policy: object
schema
Policy object for creating, modifying and fetching policy.
-
policygid: string
Identifier of the policy.
-
status: string
Status of the request
Nested Schema : schema
Type:
object
Policy object for creating, modifying and fetching policy.
Show Source
-
agentgid(required): string
Identifier of the agent to which the policy belongs
-
assuranceLevelId(required): string
Identifier of the assurance level which is associated with the policy
-
description(required): string
Policy description.
-
name(required): string
Policy Name.
-
policygid: string
Identifier of the policy
-
scoringEngine: string
Engine used for scoring the policy (Aggregated, Average, Maximum, Minimum, Weighted Average, Weighted Maximum, Weighted Minimum)
-
status(required): string
Status of the policy. It can be one of the following values. Active, Disabled or Deleted.
-
weight: integer
Number between 0 to 100 to define the weight of the policy if there are multiple policies in the assurance level.
401 Response
Unauthorized
500 Response
Internal server error
503 Response
Service Unavailable
Examples
In OARM, you can update an existing policy (transitioned from OAAM). The following example shows a sample request and response. The OAAM policies can be viewed on the OAAM Policy Explorer.
cURL Command to update OAAM Policies in JSON Format
curl --location --request PUT '<PolicyUrl>/policy/risk/v1/policies/51143_424de17591ff7cb74bba3759a9fa6aaf453769e756b08693b43253d09a113439' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \ --header 'Content-Type: application/json' \ --data '{ "name": "OAAM Challenge Policy 1", "description": "Device Identification policy for mobile devices.", "weight": "100", "scoringEngine": "Maximum" }'
Sample Response in JSON Format
{ "status": "200", "message": "Policy update is successfully.", "policygid": "51143_424de17591ff7cb74bba3759a9fa6aaf453769e756b08693b43253d09a113439", "policy": { "assuranceLevelId": "postauth", "name": "OAAM Challenge Policy 1", "description": "Device Identification policy for mobile devices.", "status": "ACTIVE", "scoringEngine": "Maximum", "weight": 100, "policygid": "51143_424de17591ff7cb74bba3759a9fa6aaf453769e756b08693b43253d09a113439" } }
cURL Command to update OAAM Policies in XML Format
curl --location --request PUT '<PolicyUrl>/policy/risk/v1/policies/51143_424de17591ff7cb74bba3759a9fa6aaf453769e756b08693b43253d09a113439' \ --header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \ --header 'Content-Type: application/json' \ --data '<?xml version="1.0" encoding="UTF-8" ?> <Policy> <name>OAAM Challenge Policy 1</name> <description>Device Identification policy for mobile devices.</description> <weight>100</weight> <scoringEngine>Maximum</scoringEngine> </Policy> '
Sample Response in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <PolicyResponse> <status>200</status> <message>Policy update is successfully.</message> <policygid>51143_424de17591ff7cb74bba3759a9fa6aaf453769e756b08693b43253d09a113439</policygid> <policy> <assuranceLevelId>postauth</assuranceLevelId> <name>OAAM Challenge Policy 1</name> <description>Device Identification policy for mobile devices.</description> <status>ACTIVE</status> <scoringEngine>Maximum</scoringEngine> <weight>100</weight> <policygid>51143_424de17591ff7cb74bba3759a9fa6aaf453769e756b08693b43253d09a113439</policygid> </policy> </PolicyResponse>