Update Risk Policy Set
PUT {{apiPath}}/environments/{{envID}}/riskPolicySets/{{riskPolicySetID}}
The UPDATE /environments/{{envID}}/riskPolicySets/{{riskPolicySetID}}
operation updates the risk policy set identified by its ID in the request URL.
You can use this request to add the triggers
object to a policy set to enable staging of another policy set.
Prerequisites
- See PingOne Protect and Risk Policies for important overview information.
See Risk Predictors for more information, including the data models.
Base data model
Property | Type | Required? |
---|---|---|
createdAt | Date | Required |
default | Boolean | Optional |
defaultResult | Object | Optional |
description | String | Optional |
environment.id | String | Required |
evaluatedPredictors | String[] | Optional |
id | String | Required |
name | String | Required |
riskPolicies | String[] | Required |
triggers | Object[] | Optional |
triggers.type | String | Required |
triggers.policySet | Object | Required |
triggers.policySet.id | String | Required |
triggers.expiresAt | String | Required |
updatedAt | Date | Required |
Risk policies data model
This table lists the fields and objects that can be included in each of the elements in the riskPolicies
array.
Property | Type | Required? |
---|---|---|
condition | Object | Required |
condition.aggregatedScores | Array | Required/Optional |
condition.aggregatedScores.value | String | Required |
condition.aggregatedScores.score | Integer | Required |
condition.type | String | Required |
condition.between.minScore | Integer | Required/Optional |
condition.between.maxScore | Integer | Required/Optional |
createdAt | Date | Required |
description | String | Optional |
id | String | Required |
name | String | Required |
priority | Integer | Required |
result.level | String | Required |
updatedAt | Date | Required |
Request Body
{"name"=>"Example Policy", "description"=>"This is an example policy.", "defaultResult"=>{"level"=>"Low"}, "riskPolicies"=>[{"name"=>"GEOVELOCITY_ANOMALY", "result"=>{"level"=>"HIGH"}, "condition"=>{"value"=>"${details.impossibleTravel}", "equals"=>true}}, {"name"=>"MEDIUM_WEIGHTED_POLICY", "result"=>{"level"=>"MEDIUM"}, "condition"=>{"aggregatedWeights"=>[{"value"=>"${details.aggregatedWeights.anonymousNetwork}", "weight"=>8}, {"value"=>"${details.aggregatedWeights.geoVelocity}", "weight"=>4}, {"value"=>"${details.aggregatedWeights.ipRisk}", "weight"=>8}, {"value"=>"${details.aggregatedWeights.ipVelocityByUser}", "weight"=>5}, {"value"=>"${details.aggregatedWeights.userRiskBehavior}", "weight"=>10}, {"value"=>"${details.aggregatedWeights.userBasedRiskBehavior}", "weight"=>10}, {"value"=>"${details.aggregatedWeights.userVelocityByIp}", "weight"=>5}], "between"=>{"minScore"=>40, "maxScore"=>80}}}, {"name"=>"HIGH_WEIGHTED_POLICY", "result"=>{"level"=>"HIGH"}, "condition"=>{"aggregatedWeights"=>[{"value"=>"${details.aggregatedWeights.anonymousNetwork}", "weight"=>8}, {"value"=>"${details.aggregatedWeights.geoVelocity}", "weight"=>4}, {"value"=>"${details.aggregatedWeights.ipRisk}", "weight"=>8}, {"value"=>"${details.aggregatedWeights.ipVelocityByUser}", "weight"=>5}, {"value"=>"${details.aggregatedWeights.userRiskBehavior}", "weight"=>10}, {"value"=>"${details.aggregatedWeights.userBasedRiskBehavior}", "weight"=>10}, {"value"=>"${details.aggregatedWeights.userVelocityByIp}", "weight"=>5}], "between"=>{"minScore"=>80, "maxScore"=>100}}}]}
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPolicySets/fa0447ad-dac5-435a-be3b-b2c14f520167"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"id":"fa0447ad-dac5-435a-be3b-b2c14f520167","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"name":"Score-based policy","createdAt":"2022-09-22T14:10:59.266Z","updatedAt":"2022-09-22T14:33:15.032Z","defaultResult":{"level":"LOW","type":"VALUE"},"riskPolicies":[{"id":"25e7162a-0941-486f-b308-ab6067b6170b","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"policySet":{"id":"fa0447ad-dac5-435a-be3b-b2c14f520167"},"name":"ANONYMOUS_NETWORK_DETECTION","priority":1,"result":{"level":"HIGH","type":"VALUE"},"condition":{"equals":true,"value":"${details.anonymousNetworkDetected}","type":"VALUE_COMPARISON"},"createdAt":"2022-09-22T14:33:15.032Z","updatedAt":"2022-09-22T14:33:15.032Z"},{"id":"e094e610-2e47-4a1c-866c-3ac59f7f7890","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"policySet":{"id":"fa0447ad-dac5-435a-be3b-b2c14f520167"},"name":"GEOVELOCITY_ANOMALY","priority":2,"result":{"level":"MEDIUM","type":"VALUE"},"condition":{"equals":true,"value":"${details.impossibleTravel}","type":"VALUE_COMPARISON"},"createdAt":"2022-09-22T14:33:15.032Z","updatedAt":"2022-09-22T14:33:15.032Z"},{"id":"15e49eb3-4932-4e05-84d0-cb97b9530542","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"policySet":{"id":"fa0447ad-dac5-435a-be3b-b2c14f520167"},"name":"Medium scored policy","priority":4,"result":{"level":"MEDIUM","type":"VALUE"},"condition":{"between":{"minScore":700,"maxScore":900},"aggregatedScores":[{"value":"${details.userLocationAnomaly.level}","score":40},{"value":"${details.anonymousNetwork.level}","score":60},{"value":"${details.ipRisk.level}","score":40}],"type":"AGGREGATED_SCORES"},"createdAt":"2022-09-22T14:33:15.032Z","updatedAt":"2022-09-22T14:33:15.032Z"},{"id":"64f61fab-a24d-4919-bb89-d24cfc1ce678","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"policySet":{"id":"fa0447ad-dac5-435a-be3b-b2c14f520167"},"name":"High scored policy","priority":3,"result":{"level":"HIGH","type":"VALUE"},"condition":{"between":{"minScore":900,"maxScore":1000},"aggregatedScores":[{"value":"${details.userLocationAnomaly.level}","score":40},{"value":"${details.anonymousNetwork.level}","score":60},{"value":"${details.ipRisk.level}","score":40}],"type":"AGGREGATED_SCORES"},"createdAt":"2022-09-22T14:33:15.032Z","updatedAt":"2022-09-22T14:33:15.032Z"}],"triggers":[{"type":"POLICY_SET_STAGING","policySet":{"id":"c468daa5-6d2a-40e2-9c63-1838aed36327"},"expiresAt":"2022-12-21T14:33:15.032Z"}],"default":false}