Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
*/
public void clearPasscode(String deviceId) throws ApiException {
clearPasscodeWithHttpInfo(deviceId);
}
/**
* Clear Passcode
* This endpoint sends an MDM command to clear a device passcode. Available for iPhone and iPad.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse clearPasscodeWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling clearPasscode");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/clearpasscode"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept();
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.clearPasscode", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Delete Device
* This endpoint sends an MDM command to delete a device. This will remove the device record from Kandji and send a Remove Management command. For macOS devices, it will also send an uninstall command to the Kandji Agent at the next agent checkin.
* @param deviceId (required)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
204
Delete Device
-
*/
public void deleteDevice(String deviceId) throws ApiException {
deleteDeviceWithHttpInfo(deviceId);
}
/**
* Delete Device
* This endpoint sends an MDM command to delete a device. This will remove the device record from Kandji and send a Remove Management command. For macOS devices, it will also send an uninstall command to the Kandji Agent at the next agent checkin.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
204
Delete Device
-
*/
public ApiResponse deleteDeviceWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling deleteDevice");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept();
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.deleteDevice", localVarPath, "DELETE", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Delete User
* This endpoint sends an MDM command to delete a local user account on macOS and Shared iPad (Device Supervision via Automated Device Enrollment is required). **Request Body Parameters**: application/json * * * `DeleteAllUsers` - `boolean` `ForceDeletion` - `boolean` `UserName` - `string`
* @param deviceId (required)
* @param deleteUserRequest (optional)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Delete User
-
*/
public void deleteUser(String deviceId, DeleteUserRequest deleteUserRequest) throws ApiException {
deleteUserWithHttpInfo(deviceId, deleteUserRequest);
}
/**
* Delete User
* This endpoint sends an MDM command to delete a local user account on macOS and Shared iPad (Device Supervision via Automated Device Enrollment is required). **Request Body Parameters**: application/json * * * `DeleteAllUsers` - `boolean` `ForceDeletion` - `boolean` `UserName` - `string`
* @param deviceId (required)
* @param deleteUserRequest (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Delete User
-
*/
public ApiResponse deleteUserWithHttpInfo(String deviceId, DeleteUserRequest deleteUserRequest) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling deleteUser");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/deleteuser"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept();
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.deleteUser", localVarPath, "POST", new ArrayList<>(), deleteUserRequest,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Disable Lost Mode
* This command will send a request to turn off lost mode on iOS and iPadOS. If the command is already pending, the message \"_Disable lost mode is already pending for this device._\" will be in the response.
* @param deviceId (required)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Disable Lost Mode
-
*/
public void disableLostMode(String deviceId) throws ApiException {
disableLostModeWithHttpInfo(deviceId);
}
/**
* Disable Lost Mode
* This command will send a request to turn off lost mode on iOS and iPadOS. If the command is already pending, the message \"_Disable lost mode is already pending for this device._\" will be in the response.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Disable Lost Mode
-
*/
public ApiResponse disableLostModeWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling disableLostMode");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/disablelostmode"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.disableLostMode", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Enable Lost Mode
* This endpoint sends an MDM command to remotely turn on lost mode on iOS and iPadOS. Optionally, a JSON payload can be sent in the request to set a lock message, phone number, and footnote on the target device.
* @param deviceId (required)
* @param enableLostModeRequest (optional)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Enable Lost Mode
-
*/
public void enableLostMode(String deviceId, EnableLostModeRequest enableLostModeRequest) throws ApiException {
enableLostModeWithHttpInfo(deviceId, enableLostModeRequest);
}
/**
* Enable Lost Mode
* This endpoint sends an MDM command to remotely turn on lost mode on iOS and iPadOS. Optionally, a JSON payload can be sent in the request to set a lock message, phone number, and footnote on the target device.
* @param deviceId (required)
* @param enableLostModeRequest (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Enable Lost Mode
-
*/
public ApiResponse enableLostModeWithHttpInfo(String deviceId, EnableLostModeRequest enableLostModeRequest) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling enableLostMode");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/enablelostmode"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.enableLostMode", localVarPath, "POST", new ArrayList<>(), enableLostModeRequest,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Erase Device
* This endpoint sends an MDM command to erase the device. iOS 4.0+, iPadOS 4.0+, macOS 10.7+, tvOS 10.2+ **Request Body Parameters: application/json** | Key | Type | Description | | --- | --- | --- | | `PIN` | `string` | The six-character PIN for Find My. This value is available in macOS 10.8 and later. | | `PreserveDataPlan` | `boolean` | If true, preserve the data plan on an iPhone or iPad with eSIM functionality, if one exists. This value is available in iOS 11 and later. <br> <br>Default: true | | `DisallowProximitySetup` | `boolean` | If true, disable Proximity Setup on the next reboot and skip the pane in Setup Assistant. This value is available in iOS 11 and later. Prior to iOS 14, don’t use this option with any other option. <br> <br>Default: false | | `ReturnToService` | `object` | (iOS 17 and later and iPadOS 17 and later and with Shared iPad ) When sending the erase device command to mobile devices, use this key to enable Return to Service. Include an optional Wi-Fi payload ProfileId to allow the device to connect to a Wi-Fi network automatically after being erased. If a Wi-Fi ProfileId is not provided and the mobile device is not tethered to a Mac to share the network connection, the end-user will be required to select a Wi-Fi network to complete the setup. <br> <br>If sent to any macOS computer or to mobile devices on iOS 16 or iPadOS 16 and below, the RTS keys will be ignored, and only the erase device command will be issued to the device. | | \\- `Enabled` | `boolean` | (Required) If true, the device tries to re-enroll itself automatically after erasure. The user needs to deactivate all activation locks for this feature to work correctly. | | \\- `ProfileId` | `string` | Profile ID value associated with a Wi-Fi profile payload. This is required when the device doesn’t have ethernet access. |
* @param deviceId (required)
* @param eraseDeviceRequest (optional)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
macOS / Return to service
-
400
RTS - Profile not in scope
-
*/
public void eraseDevice(String deviceId, EraseDeviceRequest eraseDeviceRequest) throws ApiException {
eraseDeviceWithHttpInfo(deviceId, eraseDeviceRequest);
}
/**
* Erase Device
* This endpoint sends an MDM command to erase the device. iOS 4.0+, iPadOS 4.0+, macOS 10.7+, tvOS 10.2+ **Request Body Parameters: application/json** | Key | Type | Description | | --- | --- | --- | | `PIN` | `string` | The six-character PIN for Find My. This value is available in macOS 10.8 and later. | | `PreserveDataPlan` | `boolean` | If true, preserve the data plan on an iPhone or iPad with eSIM functionality, if one exists. This value is available in iOS 11 and later. <br> <br>Default: true | | `DisallowProximitySetup` | `boolean` | If true, disable Proximity Setup on the next reboot and skip the pane in Setup Assistant. This value is available in iOS 11 and later. Prior to iOS 14, don’t use this option with any other option. <br> <br>Default: false | | `ReturnToService` | `object` | (iOS 17 and later and iPadOS 17 and later and with Shared iPad ) When sending the erase device command to mobile devices, use this key to enable Return to Service. Include an optional Wi-Fi payload ProfileId to allow the device to connect to a Wi-Fi network automatically after being erased. If a Wi-Fi ProfileId is not provided and the mobile device is not tethered to a Mac to share the network connection, the end-user will be required to select a Wi-Fi network to complete the setup. <br> <br>If sent to any macOS computer or to mobile devices on iOS 16 or iPadOS 16 and below, the RTS keys will be ignored, and only the erase device command will be issued to the device. | | \\- `Enabled` | `boolean` | (Required) If true, the device tries to re-enroll itself automatically after erasure. The user needs to deactivate all activation locks for this feature to work correctly. | | \\- `ProfileId` | `string` | Profile ID value associated with a Wi-Fi profile payload. This is required when the device doesn’t have ethernet access. |
* @param deviceId (required)
* @param eraseDeviceRequest (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
macOS / Return to service
-
400
RTS - Profile not in scope
-
*/
public ApiResponse eraseDeviceWithHttpInfo(String deviceId, EraseDeviceRequest eraseDeviceRequest) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling eraseDevice");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/erase"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("application/octet-stream");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.eraseDevice", localVarPath, "POST", new ArrayList<>(), eraseDeviceRequest,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Get Device Commands
* This endpoint sends a request to get information about the commands sent to a given device ID. ### MDM Status Codes * 1 : Command is Pending * 2 : Command is running * 3 : Command completed * 4 : Command failed * 5 : Command received \"Not Now\" response
* @param deviceId (required)
* @param limit A hard upper `limit` is set at 300 device records returned per request. If more device records are expected, pagination should be used using the `limit` and `offset` parameters. Additionally, parameter queries can be added to a request to limit the results. (optional)
* @param offset Specify the starting record to return (optional)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Get Device Commands
-
*/
public void getDeviceCommands(String deviceId, String limit, String offset) throws ApiException {
getDeviceCommandsWithHttpInfo(deviceId, limit, offset);
}
/**
* Get Device Commands
* This endpoint sends a request to get information about the commands sent to a given device ID. ### MDM Status Codes * 1 : Command is Pending * 2 : Command is running * 3 : Command completed * 4 : Command failed * 5 : Command received \"Not Now\" response
* @param deviceId (required)
* @param limit A hard upper `limit` is set at 300 device records returned per request. If more device records are expected, pagination should be used using the `limit` and `offset` parameters. Additionally, parameter queries can be added to a request to limit the results. (optional)
* @param offset Specify the starting record to return (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Get Device Commands
-
*/
public ApiResponse getDeviceCommandsWithHttpInfo(String deviceId, String limit, String offset) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling getDeviceCommands");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/commands"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
// Query parameters
List localVarQueryParams = new ArrayList<>(
apiClient.parameterToPairs("", "limit", limit)
);
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.getDeviceCommands", localVarPath, "GET", localVarQueryParams, null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Lock Device
* This endpoint sends an MDM command to remotely lock a device. For macOS clients, an unlock PIN will be created, and returned in the response. > **Caution !!!** > _For a Mac with Apple silicon running a version of macOS before 11.5 will deactivate the Mac. To reactivate, the Mac requires a network connection and authentication by a Secure Token enabled local administrator._ Optionally, a JSON payload can be sent in the request to set a lock message and phone number on the target device. **Note:** For macOS, although the lock message is displayed on all types of Mac computers, the phone number is displayed only on a Mac with Apple silicon. #### Response properties Property | Description | Type :-----|:-----|:----- PIN | Six digit pin code used to unlock a Mac. | String
* @param deviceId (required)
* @param lockDeviceRequest (optional)
* @return LockDevice200Response
* @throws ApiException if fails to make API call
* @http.response.details
*/
public LockDevice200Response lockDevice(String deviceId, LockDeviceRequest lockDeviceRequest) throws ApiException {
return lockDeviceWithHttpInfo(deviceId, lockDeviceRequest).getData();
}
/**
* Lock Device
* This endpoint sends an MDM command to remotely lock a device. For macOS clients, an unlock PIN will be created, and returned in the response. > **Caution !!!** > _For a Mac with Apple silicon running a version of macOS before 11.5 will deactivate the Mac. To reactivate, the Mac requires a network connection and authentication by a Secure Token enabled local administrator._ Optionally, a JSON payload can be sent in the request to set a lock message and phone number on the target device. **Note:** For macOS, although the lock message is displayed on all types of Mac computers, the phone number is displayed only on a Mac with Apple silicon. #### Response properties Property | Description | Type :-----|:-----|:----- PIN | Six digit pin code used to unlock a Mac. | String
* @param deviceId (required)
* @param lockDeviceRequest (optional)
* @return ApiResponse<LockDevice200Response>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse lockDeviceWithHttpInfo(String deviceId, LockDeviceRequest lockDeviceRequest) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling lockDevice");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/lock"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("application/json", "application/octet-stream");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("DeviceActionsApi.lockDevice", localVarPath, "POST", new ArrayList<>(), lockDeviceRequest,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Play Lost Mode Sound
* This command will tell the target iOS or iPadOS device to play the lost mode sound. **Note**: The Lost Mode sound will play for 2 minutes, even if the device is in silent mode. Anyone finding the device can silence the sound by pressing any of its side buttons.
* @param deviceId (required)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Play Lost Mode Sound
-
*/
public void playLostModeSound(String deviceId) throws ApiException {
playLostModeSoundWithHttpInfo(deviceId);
}
/**
* Play Lost Mode Sound
* This command will tell the target iOS or iPadOS device to play the lost mode sound. **Note**: The Lost Mode sound will play for 2 minutes, even if the device is in silent mode. Anyone finding the device can silence the sound by pressing any of its side buttons.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Play Lost Mode Sound
-
*/
public ApiResponse playLostModeSoundWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling playLostModeSound");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/playlostmodesound"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.playLostModeSound", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Reinstall Agent
* This endpoint sends an MDM command reinstall the Kandji Agent. Available for macOS devices.
* @param deviceId (required)
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void reinstallAgent(String deviceId) throws ApiException {
reinstallAgentWithHttpInfo(deviceId);
}
/**
* Reinstall Agent
* This endpoint sends an MDM command reinstall the Kandji Agent. Available for macOS devices.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse reinstallAgentWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling reinstallAgent");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/reinstallagent"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept();
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.reinstallAgent", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Remote Desktop
* This endpoint sends an MDM command to control the Remote Management status on a Mac. This MDM command turns on (or turns off) Remote Management with *Observe* and *Control* permissions given to all users*.* **Request Body Parameters**: application/json * * * `EnableRemoteDesktop` - `boolean`
* @param deviceId (required)
* @param remoteDesktopRequest (optional)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Turn on Remote Desktop / Turn off Remote Desktop
-
*/
public void remoteDesktop(String deviceId, RemoteDesktopRequest remoteDesktopRequest) throws ApiException {
remoteDesktopWithHttpInfo(deviceId, remoteDesktopRequest);
}
/**
* Remote Desktop
* This endpoint sends an MDM command to control the Remote Management status on a Mac. This MDM command turns on (or turns off) Remote Management with *Observe* and *Control* permissions given to all users*.* **Request Body Parameters**: application/json * * * `EnableRemoteDesktop` - `boolean`
* @param deviceId (required)
* @param remoteDesktopRequest (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Turn on Remote Desktop / Turn off Remote Desktop
-
*/
public ApiResponse remoteDesktopWithHttpInfo(String deviceId, RemoteDesktopRequest remoteDesktopRequest) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling remoteDesktop");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/remotedesktop"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.remoteDesktop", localVarPath, "POST", new ArrayList<>(), remoteDesktopRequest,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Renew MDM Profile
* This endpoint sends an MDM command to re-install the existing root MDM profile for a given device ID. This command will not impact any existing configurations, apps, or profiles.
* @param deviceId (required)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Renew MDM Profile
-
*/
public void renewMdmProfile(String deviceId) throws ApiException {
renewMdmProfileWithHttpInfo(deviceId);
}
/**
* Renew MDM Profile
* This endpoint sends an MDM command to re-install the existing root MDM profile for a given device ID. This command will not impact any existing configurations, apps, or profiles.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Renew MDM Profile
-
*/
public ApiResponse renewMdmProfileWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling renewMdmProfile");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/renewmdmprofile"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.renewMdmProfile", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Restart Device
* This endpoint sends an MDM command to remotely restart a device. - `RebuildKernelCache` - If `true`, the system rebuilds the kernel cache during a device restart. If `BootstrapTokenAllowedForAuthentication` is `true` inSecurityInfoResponse.SecurityInfo, the device requests the bootstrap token from MDM before executing this command. This value is available in macOS 11 and later. Default: false - `NotifyUser` - If `true`, notifies the user to restart the device at their convenience. Forced restart if the device is at `loginwindow` with no logged-in users. The user can dismiss the notification and ignore the request. No further notifications display unless you resend the command. This value is available in macOS 11.3 and later. Default: false
* @param deviceId (required)
* @param restartDeviceRequest (optional)
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void restartDevice(String deviceId, RestartDeviceRequest restartDeviceRequest) throws ApiException {
restartDeviceWithHttpInfo(deviceId, restartDeviceRequest);
}
/**
* Restart Device
* This endpoint sends an MDM command to remotely restart a device. - `RebuildKernelCache` - If `true`, the system rebuilds the kernel cache during a device restart. If `BootstrapTokenAllowedForAuthentication` is `true` inSecurityInfoResponse.SecurityInfo, the device requests the bootstrap token from MDM before executing this command. This value is available in macOS 11 and later. Default: false - `NotifyUser` - If `true`, notifies the user to restart the device at their convenience. Forced restart if the device is at `loginwindow` with no logged-in users. The user can dismiss the notification and ignore the request. No further notifications display unless you resend the command. This value is available in macOS 11.3 and later. Default: false
* @param deviceId (required)
* @param restartDeviceRequest (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void sendBlankpush(String deviceId) throws ApiException {
sendBlankpushWithHttpInfo(deviceId);
}
/**
* Send Blankpush
* This endpoint sends an MDM command to initiate a blank push. [Using the Blank Push command](https://support.kandji.io/what-is-a-blank-push)
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void setName(String deviceId, SetNameRequest setNameRequest) throws ApiException {
setNameWithHttpInfo(deviceId, setNameRequest);
}
/**
* Set Name
* This endpoint sends an MDM command to set the device name. **Request Body Parameters**: application/json * * * `DeviceName` - `string`
* @param deviceId (required)
* @param setNameRequest (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void shutdown(String deviceId) throws ApiException {
shutdownWithHttpInfo(deviceId);
}
/**
* Shutdown
* This endpoint sends an MDM command to shutdown a device.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse shutdownWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling shutdown");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/shutdown"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept();
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.shutdown", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Unlock Account
* This endpoint sends an MDM command to unlock a user account that locked by the system because of too many failed password attempts. Available for macOS. **Request Body Parameters**: application/json * * * `UserName` - `string`
* @param deviceId (required)
* @param unlockAccountRequest (optional)
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void unlockAccount(String deviceId, UnlockAccountRequest unlockAccountRequest) throws ApiException {
unlockAccountWithHttpInfo(deviceId, unlockAccountRequest);
}
/**
* Unlock Account
* This endpoint sends an MDM command to unlock a user account that locked by the system because of too many failed password attempts. Available for macOS. **Request Body Parameters**: application/json * * * `UserName` - `string`
* @param deviceId (required)
* @param unlockAccountRequest (optional)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public void updateInventory(String deviceId) throws ApiException {
updateInventoryWithHttpInfo(deviceId);
}
/**
* Update Inventory
* This endpoint sends an MDM command to start a check-in for a device, initiating the daily MDM commands and MDM logic.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*/
public ApiResponse updateInventoryWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling updateInventory");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/updateinventory"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept();
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.updateInventory", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
/**
* Update Location
* This endpoint sends an MDM command to update the location data on iOS and iPadOS.
* @param deviceId (required)
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Update Location
-
*/
public void updateLocation(String deviceId) throws ApiException {
updateLocationWithHttpInfo(deviceId);
}
/**
* Update Location
* This endpoint sends an MDM command to update the location data on iOS and iPadOS.
* @param deviceId (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Response Details
Status Code
Description
Response Headers
200
Update Location
-
*/
public ApiResponse updateLocationWithHttpInfo(String deviceId) throws ApiException {
// Check required parameters
if (deviceId == null) {
throw new ApiException(400, "Missing the required parameter 'deviceId' when calling updateLocation");
}
// Path parameters
String localVarPath = "/api/v1/devices/{device_id}/action/updatelocation"
.replaceAll("\\{device_id}", apiClient.escapeString(deviceId.toString()));
String localVarAccept = apiClient.selectHeaderAccept("text/plain");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
return apiClient.invokeAPI("DeviceActionsApi.updateLocation", localVarPath, "POST", new ArrayList<>(), null,
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, null, false);
}
}