All URIs are relative to https://subdomain.okta.com
| Method | HTTP request | Description |
|---|---|---|
| GetUserRisk | GET /api/v1/users/{userId}/risk | Retrieve the user's risk |
| UpsertUserRisk | PUT /api/v1/users/{userId}/risk | Upsert the user's risk |
UserRiskGetResponse GetUserRisk (string userId)
Retrieve the user's risk
Retrieves the user risk object for a user ID
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetUserRiskExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new UserRiskApi(config);
var userId = 00ub0oNGTSWTBKOLGLNR; // string | ID of an existing Okta user
try
{
// Retrieve the user's risk
UserRiskGetResponse result = apiInstance.GetUserRisk(userId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserRiskApi.GetUserRisk: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| userId | string | ID of an existing Okta user |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserRiskPutResponse UpsertUserRisk (string userId, UserRiskRequest userRiskRequest)
Upsert the user's risk
Upserts (creates or updates) the user risk object for a user ID
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class UpsertUserRiskExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new UserRiskApi(config);
var userId = 00ub0oNGTSWTBKOLGLNR; // string | ID of an existing Okta user
var userRiskRequest = new UserRiskRequest(); // UserRiskRequest |
try
{
// Upsert the user's risk
UserRiskPutResponse result = apiInstance.UpsertUserRisk(userId, userRiskRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UserRiskApi.UpsertUserRisk: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| userId | string | ID of an existing Okta user | |
| userRiskRequest | UserRiskRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Updated the user's risk | - |
| 201 | Created the user's risk | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]