Package com.okta.sdk.resource.api
Class DeviceApi
java.lang.Object
com.okta.sdk.resource.api.DeviceApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-09-23T16:19:57.008753975Z[Etc/UTC]",
comments="Generator version: 7.8.0")
public class DeviceApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateDevice
(String deviceId) Activate a Device Activates a Device by setting its status to ACTIVE by `deviceId`.void
activateDevice
(String deviceId, Map<String, String> additionalHeaders) Activate a Device Activates a Device by setting its status to ACTIVE by `deviceId`.void
deactivateDevice
(String deviceId) Deactivate a Device Deactivates a Device by setting its status to DEACTIVATED by `deviceId`.void
deactivateDevice
(String deviceId, Map<String, String> additionalHeaders) Deactivate a Device Deactivates a Device by setting its status to DEACTIVATED by `deviceId`.void
deleteDevice
(String deviceId) Delete a Device Deletes (permanently) a device by `deviceId` if it has a status of `DEACTIVATED`.void
deleteDevice
(String deviceId, Map<String, String> additionalHeaders) Delete a Device Deletes (permanently) a device by `deviceId` if it has a status of `DEACTIVATED`.Retrieve a Device Retrieves a device by `deviceId`Retrieve a Device Retrieves a device by `deviceId`protected static com.fasterxml.jackson.databind.ObjectMapper
listDevices
(String after, Integer limit, String search, String expand) List all Devices Lists all devices with pagination support.listDevices
(String after, Integer limit, String search, String expand, Map<String, String> additionalHeaders) List all Devices Lists all devices with pagination support.listDeviceUsers
(String deviceId) List all Users for a Device Lists all Users for a Device by `deviceId`listDeviceUsers
(String deviceId, Map<String, String> additionalHeaders) List all Users for a Device Lists all Users for a Device by `deviceId`void
setApiClient
(ApiClient apiClient) void
suspendDevice
(String deviceId) Suspend a Device Suspends a Device by setting its status to SUSPENDED.void
suspendDevice
(String deviceId, Map<String, String> additionalHeaders) Suspend a Device Suspends a Device by setting its status to SUSPENDED.void
unsuspendDevice
(String deviceId) Unsuspend a Device Unsuspends a Device by returning its `status` to ACTIVE.void
unsuspendDevice
(String deviceId, Map<String, String> additionalHeaders) Unsuspend a Device Unsuspends a Device by returning its `status` to ACTIVE.
-
Constructor Details
-
DeviceApi
public DeviceApi() -
DeviceApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activateDevice
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 ApiExceptionActivate 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
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 ApiExceptionDeactivate 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
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
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
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
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
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 ApiExceptionList 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 ApiExceptionList 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
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 ApiExceptionSuspend 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
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 ApiExceptionUnsuspend 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()
-