PingOne Platform APIs

Read All Risk Predictors

 

GET {{apiPath}}/environments/{{envID}}/riskPredictors

The GET {{apiPath}}/environments/{{envID}}/riskPredictors operation returns all of the risk predictors associated with the specified environment.

Headers

Authorization      Bearer {{accessToken}}

Example Request

  • cURL

  • C#

  • Go

  • HTTP

  • Java

  • jQuery

  • NodeJS

  • Python

  • PHP

  • Ruby

  • Swift

curl --location --globoff '{{apiPath}}/environments/{{envID}}/riskPredictors' \
--header 'Authorization: Bearer {{accessToken}}'
var options = new RestClientOptions("{{apiPath}}/environments/{{envID}}/riskPredictors")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer {{accessToken}}");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "{{apiPath}}/environments/{{envID}}/riskPredictors"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer {{accessToken}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /environments/{{envID}}/riskPredictors HTTP/1.1
Host: {{apiPath}}
Authorization: Bearer {{accessToken}}
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("{{apiPath}}/environments/{{envID}}/riskPredictors")
  .method("GET", body)
  .addHeader("Authorization", "Bearer {{accessToken}}")
  .build();
Response response = client.newCall(request).execute();
var settings = {
  "url": "{{apiPath}}/environments/{{envID}}/riskPredictors",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {{accessToken}}"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{apiPath}}/environments/{{envID}}/riskPredictors',
  'headers': {
    'Authorization': 'Bearer {{accessToken}}'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
import requests

url = "{{apiPath}}/environments/{{envID}}/riskPredictors"

payload = {}
headers = {
  'Authorization': 'Bearer {{accessToken}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{apiPath}}/environments/{{envID}}/riskPredictors');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'Bearer {{accessToken}}'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
require "uri"
require "net/http"

url = URI("{{apiPath}}/environments/{{envID}}/riskPredictors")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{accessToken}}"

response = http.request(request)
puts response.read_body
var request = URLRequest(url: URL(string: "{{apiPath}}/environments/{{envID}}/riskPredictors")!,timeoutInterval: Double.infinity)
request.addValue("Bearer {{accessToken}}", forHTTPHeaderField: "Authorization")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example Response

200 OK

{
    "_links": {
        "self": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors"
        },
        "environment": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
        }
    },
    "_embedded": {
        "riskPredictors": [
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/4a1ff613-0f6c-0fab-303f-9f4aba12d9bb"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "4a1ff613-0f6c-0fab-303f-9f4aba12d9bb",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "User Risk Behavior",
                "compactName": "userRiskBehavior",
                "licensed": true,
                "predictionModel": {
                    "name": "login_anomaly_statistic"
                },
                "type": "USER_RISK_BEHAVIOR",
                "condition": {
                    "scores": [
                        {
                            "name": "HIGH",
                            "value": "HIGH"
                        },
                        {
                            "name": "MEDIUM",
                            "value": "MEDIUM"
                        },
                        {
                            "name": "LOW",
                            "value": "LOW"
                        }
                    ]
                },
                "default": {
                    "weight": 10,
                    "evaluated": true
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/174afbf5-f7aa-0b8d-1dc5-53755bd70561"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "174afbf5-f7aa-0b8d-1dc5-53755bd70561",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "IP Velocity",
                "compactName": "ipVelocityByUser",
                "licensed": true,
                "measure": "DISTINCT_COUNT",
                "of": "${event.ip}",
                "by": [
                    "${event.user.id}"
                ],
                "every": {
                    "unit": "HOUR",
                    "quantity": 1,
                    "minSample": 5
                },
                "use": {
                    "type": "Z_TEST",
                    "medium": 2.0,
                    "high": 4.0
                },
                "slidingWindow": {
                    "unit": "DAY",
                    "quantity": 7,
                    "minSample": 3
                },
                "fallback": {
                    "strategy": "ENVIRONMENT_MAX",
                    "high": 30.0,
                    "medium": 20.0
                },
                "maxDelay": {
                    "unit": "DAY",
                    "quantity": 1
                },
                "type": "VELOCITY",
                "condition": {
                    "scores": [
                        {
                            "name": "HIGH",
                            "value": "HIGH"
                        },
                        {
                            "name": "MEDIUM",
                            "value": "MEDIUM"
                        },
                        {
                            "name": "LOW",
                            "value": "LOW"
                        }
                    ]
                },
                "default": {
                    "weight": 5,
                    "evaluated": true
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/56d1eea9-68ca-0373-2b3b-6c67329e1448"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "56d1eea9-68ca-0373-2b3b-6c67329e1448",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "User Velocity",
                "compactName": "userVelocityByIp",
                "licensed": true,
                "measure": "DISTINCT_COUNT",
                "of": "${event.user.id}",
                "by": [
                    "${event.ip}"
                ],
                "every": {
                    "unit": "HOUR",
                    "quantity": 1,
                    "minSample": 5
                },
                "use": {
                    "type": "Z_TEST",
                    "medium": 2.0,
                    "high": 4.0
                },
                "slidingWindow": {
                    "unit": "DAY",
                    "quantity": 7,
                    "minSample": 3
                },
                "fallback": {
                    "strategy": "ENVIRONMENT_MAX",
                    "high": 3500.0,
                    "medium": 2500.0
                },
                "maxDelay": {
                    "unit": "DAY",
                    "quantity": 1
                },
                "type": "VELOCITY",
                "condition": {
                    "scores": [
                        {
                            "name": "HIGH",
                            "value": "HIGH"
                        },
                        {
                            "name": "MEDIUM",
                            "value": "MEDIUM"
                        },
                        {
                            "name": "LOW",
                            "value": "LOW"
                        }
                    ]
                },
                "default": {
                    "weight": 5,
                    "evaluated": true
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/0b5be633-d2ef-0776-06c7-a027ac6e47c2"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "0b5be633-d2ef-0776-06c7-a027ac6e47c2",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "User-Based Risk Behavior",
                "compactName": "userBasedRiskBehavior",
                "licensed": true,
                "predictionModel": {
                    "name": "points"
                },
                "type": "USER_RISK_BEHAVIOR",
                "condition": {
                    "scores": [
                        {
                            "name": "HIGH",
                            "value": "HIGH"
                        },
                        {
                            "name": "MEDIUM",
                            "value": "MEDIUM"
                        },
                        {
                            "name": "LOW",
                            "value": "LOW"
                        }
                    ]
                },
                "default": {
                    "weight": 10,
                    "evaluated": true
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/e605c889-4f43-04f6-3388-9ebe1f4591f1"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "e605c889-4f43-04f6-3388-9ebe1f4591f1",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "Anonymous Network Detection",
                "compactName": "anonymousNetwork",
                "licensed": false,
                "whiteList": [],
                "condition": {
                    "scores": [
                        {
                            "name": "true",
                            "value": "HIGH"
                        },
                        {
                            "name": "false",
                            "value": "LOW"
                        }
                    ]
                },
                "type": "ANONYMOUS_NETWORK",
                "default": {
                    "weight": 8,
                    "evaluated": false
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/3fc89376-d9be-08e4-1915-0d8fb2424194"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "3fc89376-d9be-08e4-1915-0d8fb2424194",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "IP Reputation",
                "compactName": "ipRisk",
                "licensed": false,
                "whiteList": [],
                "type": "IP_REPUTATION",
                "condition": {
                    "scores": [
                        {
                            "name": "HIGH",
                            "value": "HIGH"
                        },
                        {
                            "name": "MEDIUM",
                            "value": "MEDIUM"
                        },
                        {
                            "name": "LOW",
                            "value": "LOW"
                        }
                    ]
                },
                "default": {
                    "weight": 8,
                    "evaluated": false
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/ee7c5b2f-f796-0404-070f-1c776418a472"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "ee7c5b2f-f796-0404-070f-1c776418a472",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "Geovelocity Anomaly",
                "compactName": "geoVelocity",
                "licensed": false,
                "whiteList": [],
                "condition": {
                    "scores": [
                        {
                            "name": "true",
                            "value": "HIGH"
                        },
                        {
                            "name": "false",
                            "value": "LOW"
                        }
                    ]
                },
                "type": "GEO_VELOCITY",
                "default": {
                    "weight": 4,
                    "evaluated": false
                }
            },
            {
                "_links": {
                    "self": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/riskPredictors/9197c1af-0b4b-0bd7-18bd-5e9d35f10db7"
                    },
                    "environment": {
                        "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                    }
                },
                "id": "9197c1af-0b4b-0bd7-18bd-5e9d35f10db7",
                "environment": {
                    "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
                },
                "createdAt": "2020-11-01T00:00:00.000Z",
                "updatedAt": "2020-11-01T00:00:00.000Z",
                "name": "User Location Anomaly",
                "compactName": "userLocationAnomaly",
                "licensed": false,
                "type": "USER_LOCATION_ANOMALY",
                "condition": {
                    "scores": [
                        {
                            "name": "HIGH",
                            "value": "HIGH"
                        },
                        {
                            "name": "MEDIUM",
                            "value": "MEDIUM"
                        },
                        {
                            "name": "LOW",
                            "value": "LOW"
                        }
                    ]
                },
                "default": {
                    "weight": 5,
                    "evaluated": false
                },
                "radius": {
                    "distance": 50,
                    "unit": "kilometers"
                },
                "days": 50
            }
        ]
    },
    "count": 8,
    "size": 8
}