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 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.

PropertyTypeRequired?
compactNameStringRequired
defaultObjectRequired
default.weightIntegerRequired
default.resultObjectRequired
default.result.levelStringRequired
descriptionStringOptional
licensedBooleanRequired
nameStringRequired
whiteListList[]Optional

Composite data model

PropertyTypeRequired?
compositionObjectOptional
composition.conditionString[]Optional
composition.levelString[]Optional

Custom data model

PropertyTypeRequired?
mapObjectOptional
map.high.listString[]Optional
map.medium.listString[]Optional
map.low.listString[]Optional

Velocity data model

PropertyTypeRequired?
byListOptional
ofStringOptional
thresholdObjectOptional
threshold.highIntegerOptional
threshold.mediumIntegerOptional
threshold.sourceStringOptional
threshold.calculatedAtDateOptional
threshold.expiresdAtDateOptional
velocity.distinctCountIntegerRequired
velocity.duringIntegerRequired

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"}}}