All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
CreateDeviceAssurancePolicy | POST /api/v1/device-assurances | Create a Device Assurance Policy |
DeleteDeviceAssurancePolicy | DELETE /api/v1/device-assurances/{deviceAssuranceId} | Delete a Device Assurance Policy |
GetDeviceAssurancePolicy | GET /api/v1/device-assurances/{deviceAssuranceId} | Retrieve a Device Assurance Policy |
ListDeviceAssurancePolicies | GET /api/v1/device-assurances | List all Device Assurance Policies |
ReplaceDeviceAssurancePolicy | PUT /api/v1/device-assurances/{deviceAssuranceId} | Replace a Device Assurance Policy |
DeviceAssurance CreateDeviceAssurancePolicy (DeviceAssurance deviceAssurance)
Create a Device Assurance Policy
Creates a new Device Assurance Policy
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateDeviceAssurancePolicyExample
{
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 DeviceAssuranceApi(config);
var deviceAssurance = new DeviceAssurance(); // DeviceAssurance |
try
{
// Create a Device Assurance Policy
DeviceAssurance result = apiInstance.CreateDeviceAssurancePolicy(deviceAssurance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DeviceAssuranceApi.CreateDeviceAssurancePolicy: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
deviceAssurance | DeviceAssurance |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteDeviceAssurancePolicy (string deviceAssuranceId)
Delete a Device Assurance Policy
Deletes a Device Assurance Policy by deviceAssuranceId
. If the Device Assurance Policy is currently being used in the org Authentication Policies, the delete will not be allowed.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteDeviceAssurancePolicyExample
{
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 DeviceAssuranceApi(config);
var deviceAssuranceId = "deviceAssuranceId_example"; // string | Id of the Device Assurance Policy
try
{
// Delete a Device Assurance Policy
apiInstance.DeleteDeviceAssurancePolicy(deviceAssuranceId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DeviceAssuranceApi.DeleteDeviceAssurancePolicy: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
deviceAssuranceId | string | Id of the Device Assurance Policy |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
403 | Forbidden | - |
404 | Not Found | - |
409 | Conflict | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceAssurance GetDeviceAssurancePolicy (string deviceAssuranceId)
Retrieve a Device Assurance Policy
Retrieves a Device Assurance Policy by deviceAssuranceId
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetDeviceAssurancePolicyExample
{
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 DeviceAssuranceApi(config);
var deviceAssuranceId = "deviceAssuranceId_example"; // string | Id of the Device Assurance Policy
try
{
// Retrieve a Device Assurance Policy
DeviceAssurance result = apiInstance.GetDeviceAssurancePolicy(deviceAssuranceId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DeviceAssuranceApi.GetDeviceAssurancePolicy: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
deviceAssuranceId | string | Id of the Device Assurance Policy |
- 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]
List<DeviceAssurance> ListDeviceAssurancePolicies ()
List all Device Assurance Policies
Lists all device assurance policies
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListDeviceAssurancePoliciesExample
{
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 DeviceAssuranceApi(config);
try
{
// List all Device Assurance Policies
List<DeviceAssurance> result = apiInstance.ListDeviceAssurancePolicies().ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DeviceAssuranceApi.ListDeviceAssurancePolicies: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceAssurance ReplaceDeviceAssurancePolicy (string deviceAssuranceId, DeviceAssurance deviceAssurance)
Replace a Device Assurance Policy
Replaces a Device Assurance Policy by deviceAssuranceId
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceDeviceAssurancePolicyExample
{
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 DeviceAssuranceApi(config);
var deviceAssuranceId = "deviceAssuranceId_example"; // string | Id of the Device Assurance Policy
var deviceAssurance = new DeviceAssurance(); // DeviceAssurance |
try
{
// Replace a Device Assurance Policy
DeviceAssurance result = apiInstance.ReplaceDeviceAssurancePolicy(deviceAssuranceId, deviceAssurance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling DeviceAssuranceApi.ReplaceDeviceAssurancePolicy: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
deviceAssuranceId | string | Id of the Device Assurance Policy | |
deviceAssurance | DeviceAssurance |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
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]