Update Custom Risk Predictor
PUT {{apiPath}}/environments/{{envID}}/riskPredictors/{{riskPredictorID}}
The PUT /environments/{{envID}}/riskPredictors/{{riskPredictorID}}
operation updates the setting for a custom risk predictor. The API allows updates to risk predictors only if the type
property is set to MAP
.
Note: A risk predictor's type
property cannot be updated in a PUT
request.
Prerequisites
- See PingOne Protect and Risk Predictors for important overview information.
See Risk Predictors for the complete data models.
Base data model
For a type
value of MAP
, refer also to Custom data model. For a type
value of VELOCITY
, refer also to Velocity data model.
Property | Type | Required? |
---|---|---|
compactName | String | Required |
default | Object | Required |
default.weight | Integer | Required |
default.result | Object | Required |
default.result.level | String | Required |
description | String | Optional |
licensed | Boolean | Required |
name | String | Required |
whiteList | List[] | Optional |
Composite data model
Property | Type | Required? |
---|---|---|
composition | Object | Optional |
composition.condition | String[] | Optional |
composition.level | String[] | Optional |
Custom data model
Property | Type | Required? |
---|---|---|
map | Object | Optional |
map.high.list | String[] | Optional |
map.medium.list | String[] | Optional |
map.low.list | String[] | Optional |
Velocity data model
Property | Type | Required? |
---|---|---|
by | List | Optional |
of | String | Optional |
threshold | Object | Optional |
threshold.high | Integer | Optional |
threshold.medium | Integer | Optional |
threshold.source | String | Optional |
threshold.calculatedAt | Date | Optional |
threshold.expiresdAt | Date | Optional |
velocity.distinctCount | Integer | Required |
velocity.during | Integer | Required |
Request Body
{"name"=>"My Danger Predictor", "licensed"=>true, "map"=>{"high"=>{"list"=>["Dangerous", "Insanely Dangerous", "Unspeakably Dangerous"], "contains"=>"${event.danger.type}"}, "medium"=>{"list"=>["Kinda Dangerous", "Not Very Dangerous"], "contains"=>"${event.danger.type}"}, "low"=>{"list"=>["Kinda Safe", "Safe"], "contains"=>"${event.danger.type}"}}, "default"=>{"weight"=>5, "result"=>{"level"=>"HIGH", "type"=>"VALUE"}}}
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/3ab65954-05b0-4ed4-b525-5830be4c6e18"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"}},"id":"3ab65954-05b0-4ed4-b525-5830be4c6e18","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"createdAt":"2021-09-29T19:30:37.124Z","updatedAt":"2021-09-29T19:40:03.442Z","name":"My Danger Predictor","compactName":"riskPred","licensed":true,"map":{"high":{"list":["Dangerous","Insanely Dangerous","Unspeakably Dangerous"],"contains":"${event.danger.type}"},"medium":{"list":["Kinda Dangerous","Not Very Dangerous"],"contains":"${event.danger.type}"},"low":{"list":["Kinda Safe","Safe"],"contains":"${event.danger.type}"}},"type":"MAP","default":{"weight":5,"result":{"level":"HIGH","type":"VALUE"}}}