Class DeviceApi

java.lang.Object
com.okta.sdk.resource.api.DeviceApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-09-23T08:35:59.300824-05:00[America/Chicago]", comments="Generator version: 7.8.0") public class DeviceApi extends Object
  • Constructor Details

    • DeviceApi

      public DeviceApi()
    • DeviceApi

      public DeviceApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • activateDevice

      public void activateDevice(String deviceId) throws ApiException
      Activate a Device Activates a Device by setting its status to ACTIVE by `deviceId`. Activated devices are used to create and delete Device user links.
      Parameters:
      deviceId - `id` of the device (required)
      Throws:
      ApiException - if fails to make API call
    • activateDevice

      public void activateDevice(String deviceId, Map<String,String> additionalHeaders) throws ApiException
      Activate a Device Activates a Device by setting its status to ACTIVE by `deviceId`. Activated devices are used to create and delete Device user links.
      Parameters:
      deviceId - `id` of the device (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deactivateDevice

      public void deactivateDevice(String deviceId) throws ApiException
      Deactivate a Device Deactivates a Device by setting its status to DEACTIVATED by `deviceId`. Deactivation causes a Device to lose all device user links. Set the Device status to DEACTIVATED before deleting it. > **Note:** When deactivating a Device, keep in mind the following: - Device deactivation is a destructive operation for device factors and client certificates. Device reenrollment using Okta Verify allows end users to set up new factors on the device. - Device deletion removes the device record from Okta. Reenrollment creates a new device record.
      Parameters:
      deviceId - `id` of the device (required)
      Throws:
      ApiException - if fails to make API call
    • deactivateDevice

      public void deactivateDevice(String deviceId, Map<String,String> additionalHeaders) throws ApiException
      Deactivate a Device Deactivates a Device by setting its status to DEACTIVATED by `deviceId`. Deactivation causes a Device to lose all device user links. Set the Device status to DEACTIVATED before deleting it. > **Note:** When deactivating a Device, keep in mind the following: - Device deactivation is a destructive operation for device factors and client certificates. Device reenrollment using Okta Verify allows end users to set up new factors on the device. - Device deletion removes the device record from Okta. Reenrollment creates a new device record.
      Parameters:
      deviceId - `id` of the device (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteDevice

      public void deleteDevice(String deviceId) throws ApiException
      Delete a Device Deletes (permanently) a device by `deviceId` if it has a status of `DEACTIVATED`. You can transition the device to `DEACTIVATED` status using the [Deactivate a Device](/openapi/okta-management/management/tag/Device/#tag/Device/operation/deactivateDevice) endpoint. This request is destructive and deletes all of the profile data related to the device. Once deleted, device data can't be recovered. However, reenrollment creates a new device record. > **Note:** Attempts to delete a device that isn't in a `DEACTIVATED` state raise an error.
      Parameters:
      deviceId - `id` of the device (required)
      Throws:
      ApiException - if fails to make API call
    • deleteDevice

      public void deleteDevice(String deviceId, Map<String,String> additionalHeaders) throws ApiException
      Delete a Device Deletes (permanently) a device by `deviceId` if it has a status of `DEACTIVATED`. You can transition the device to `DEACTIVATED` status using the [Deactivate a Device](/openapi/okta-management/management/tag/Device/#tag/Device/operation/deactivateDevice) endpoint. This request is destructive and deletes all of the profile data related to the device. Once deleted, device data can't be recovered. However, reenrollment creates a new device record. > **Note:** Attempts to delete a device that isn't in a `DEACTIVATED` state raise an error.
      Parameters:
      deviceId - `id` of the device (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getDevice

      public Device getDevice(String deviceId) throws ApiException
      Retrieve a Device Retrieves a device by `deviceId`
      Parameters:
      deviceId - `id` of the device (required)
      Returns:
      Device
      Throws:
      ApiException - if fails to make API call
    • getDevice

      public Device getDevice(String deviceId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a Device Retrieves a device by `deviceId`
      Parameters:
      deviceId - `id` of the device (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Device
      Throws:
      ApiException - if fails to make API call
    • listDeviceUsers

      public List<DeviceUser> listDeviceUsers(String deviceId) throws ApiException
      List all Users for a Device Lists all Users for a Device by `deviceId`
      Parameters:
      deviceId - `id` of the device (required)
      Returns:
      List<DeviceUser>
      Throws:
      ApiException - if fails to make API call
    • listDeviceUsers

      public List<DeviceUser> listDeviceUsers(String deviceId, Map<String,String> additionalHeaders) throws ApiException
      List all Users for a Device Lists all Users for a Device by `deviceId`
      Parameters:
      deviceId - `id` of the device (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<DeviceUser>
      Throws:
      ApiException - if fails to make API call
    • listDevices

      public List<DeviceList> listDevices(String after, Integer limit, String search, String expand) throws ApiException
      List all Devices Lists all devices with pagination support. You can return a subset of Devices that match a supported search criteria using the `search` query parameter. Searches for devices based on the properties specified in the `search` parameter conforming SCIM filter specifications (case-insensitive). This data is eventually consistent. The API returns different results depending on specified queries in the request. Empty list is returned if no objects match `search` request. > **Note:** Listing devices with `search` should not be used as a part of any critical flows—such as authentication or updates—to prevent potential data loss. `search` results may not reflect the latest information, as this endpoint uses a search index which may not be up-to-date with recent updates to the object. <br> Don't use search results directly for record updates, as the data might be stale and therefore overwrite newer data, resulting in data loss. <br> Use an `id` lookup for records that you update to ensure your results contain the latest data. This operation requires [URL encoding](https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1). For example, `search=profile.displayName eq \"Bob\"` is encoded as `search=profile.displayName%20eq%20%22Bob%22`.
      Parameters:
      after - (optional)
      limit - A limit on the number of objects to return (recommend `20`) (optional, default to 200)
      search - A SCIM filter expression that filters the results. Searches include all Device `profile` properties and the Device `id`, `status`, and `lastUpdated` properties. (optional)
      expand - Includes associated user details and management status for the device in the `_embedded` attribute (optional)
      Returns:
      List<DeviceList>
      Throws:
      ApiException - if fails to make API call
    • listDevices

      public List<DeviceList> listDevices(String after, Integer limit, String search, String expand, Map<String,String> additionalHeaders) throws ApiException
      List all Devices Lists all devices with pagination support. You can return a subset of Devices that match a supported search criteria using the `search` query parameter. Searches for devices based on the properties specified in the `search` parameter conforming SCIM filter specifications (case-insensitive). This data is eventually consistent. The API returns different results depending on specified queries in the request. Empty list is returned if no objects match `search` request. > **Note:** Listing devices with `search` should not be used as a part of any critical flows—such as authentication or updates—to prevent potential data loss. `search` results may not reflect the latest information, as this endpoint uses a search index which may not be up-to-date with recent updates to the object. <br> Don't use search results directly for record updates, as the data might be stale and therefore overwrite newer data, resulting in data loss. <br> Use an `id` lookup for records that you update to ensure your results contain the latest data. This operation requires [URL encoding](https://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1). For example, `search=profile.displayName eq \"Bob\"` is encoded as `search=profile.displayName%20eq%20%22Bob%22`.
      Parameters:
      after - (optional)
      limit - A limit on the number of objects to return (recommend `20`) (optional, default to 200)
      search - A SCIM filter expression that filters the results. Searches include all Device `profile` properties and the Device `id`, `status`, and `lastUpdated` properties. (optional)
      expand - Includes associated user details and management status for the device in the `_embedded` attribute (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<DeviceList>
      Throws:
      ApiException - if fails to make API call
    • suspendDevice

      public void suspendDevice(String deviceId) throws ApiException
      Suspend a Device Suspends a Device by setting its status to SUSPENDED. Use suspended devices to create and delete device user links. You can only unsuspend or deactivate suspended devices. > **Note:** SUSPENDED status is meant to be temporary, so it isn't destructive.
      Parameters:
      deviceId - `id` of the device (required)
      Throws:
      ApiException - if fails to make API call
    • suspendDevice

      public void suspendDevice(String deviceId, Map<String,String> additionalHeaders) throws ApiException
      Suspend a Device Suspends a Device by setting its status to SUSPENDED. Use suspended devices to create and delete device user links. You can only unsuspend or deactivate suspended devices. > **Note:** SUSPENDED status is meant to be temporary, so it isn't destructive.
      Parameters:
      deviceId - `id` of the device (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • unsuspendDevice

      public void unsuspendDevice(String deviceId) throws ApiException
      Unsuspend a Device Unsuspends a Device by returning its `status` to ACTIVE. >**Note:** Only devices with a SUSPENDED status can be unsuspended.
      Parameters:
      deviceId - `id` of the device (required)
      Throws:
      ApiException - if fails to make API call
    • unsuspendDevice

      public void unsuspendDevice(String deviceId, Map<String,String> additionalHeaders) throws ApiException
      Unsuspend a Device Unsuspends a Device by returning its `status` to ACTIVE. >**Note:** Only devices with a SUSPENDED status can be unsuspended.
      Parameters:
      deviceId - `id` of the device (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()