Skip to content

Latest commit

 

History

History
406 lines (313 loc) · 12.8 KB

DeviceAssuranceApi.md

File metadata and controls

406 lines (313 loc) · 12.8 KB

Okta.Sdk.Api.DeviceAssuranceApi

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

CreateDeviceAssurancePolicy

DeviceAssurance CreateDeviceAssurancePolicy (DeviceAssurance deviceAssurance)

Create a Device Assurance Policy

Creates a new Device Assurance Policy

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
deviceAssurance DeviceAssurance

Return type

DeviceAssurance

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

DeleteDeviceAssurancePolicy

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.

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
deviceAssuranceId string Id of the Device Assurance Policy

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

GetDeviceAssurancePolicy

DeviceAssurance GetDeviceAssurancePolicy (string deviceAssuranceId)

Retrieve a Device Assurance Policy

Retrieves a Device Assurance Policy by deviceAssuranceId

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
deviceAssuranceId string Id of the Device Assurance Policy

Return type

DeviceAssurance

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

ListDeviceAssurancePolicies

List<DeviceAssurance> ListDeviceAssurancePolicies ()

List all Device Assurance Policies

Lists all device assurance policies

Example

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);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List<DeviceAssurance>

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

ReplaceDeviceAssurancePolicy

DeviceAssurance ReplaceDeviceAssurancePolicy (string deviceAssuranceId, DeviceAssurance deviceAssurance)

Replace a Device Assurance Policy

Replaces a Device Assurance Policy by deviceAssuranceId

Example

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);
            }
        }
    }
}

Parameters

Name Type Description Notes
deviceAssuranceId string Id of the Device Assurance Policy
deviceAssurance DeviceAssurance

Return type

DeviceAssurance

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]