|
|
@ -19,6 +19,8 @@
|
|
|
|
package org.wso2.carbon.mdm.services.android.services;
|
|
|
|
package org.wso2.carbon.mdm.services.android.services;
|
|
|
|
|
|
|
|
|
|
|
|
import io.swagger.annotations.*;
|
|
|
|
import io.swagger.annotations.*;
|
|
|
|
|
|
|
|
import org.wso2.carbon.apimgt.annotations.api.API;
|
|
|
|
|
|
|
|
import org.wso2.carbon.apimgt.annotations.api.Scope;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
|
|
|
import org.wso2.carbon.mdm.services.android.bean.wrapper.*;
|
|
|
|
import org.wso2.carbon.mdm.services.android.bean.wrapper.*;
|
|
|
|
|
|
|
|
|
|
|
@ -30,6 +32,10 @@ import javax.ws.rs.core.MediaType;
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@API(name = "Android Device Management Administrative Service", version = "1.0.0",
|
|
|
|
|
|
|
|
context = "api/device-mgt/android/v1.0/admin/devices",
|
|
|
|
|
|
|
|
tags = {"devicemgt_android"})
|
|
|
|
|
|
|
|
|
|
|
|
@Path("/admin/devices")
|
|
|
|
@Path("/admin/devices")
|
|
|
|
@Api(value = "Android Device Management Administrative Service", description = "Device management related admin APIs.")
|
|
|
|
@Api(value = "Android Device Management Administrative Service", description = "Device management related admin APIs.")
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
|
@Produces(MediaType.APPLICATION_JSON)
|
|
|
@ -85,6 +91,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new lock operation.")
|
|
|
|
"Server error occurred while adding a new lock operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:lock", name = "Lock device", description = "")
|
|
|
|
Response configureDeviceLock(
|
|
|
|
Response configureDeviceLock(
|
|
|
|
@ApiParam(name = "deviceLockBeanWrapper",
|
|
|
|
@ApiParam(name = "deviceLockBeanWrapper",
|
|
|
|
value = "Device lock configurations with device IDs") DeviceLockBeanWrapper deviceLockBeanWrapper);
|
|
|
|
value = "Device lock configurations with device IDs") DeviceLockBeanWrapper deviceLockBeanWrapper);
|
|
|
@ -138,6 +145,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new un-lock operation.")
|
|
|
|
"Server error occurred while adding a new un-lock operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:unlock", name = "Unlock device", description = "")
|
|
|
|
Response configureDeviceUnlock(
|
|
|
|
Response configureDeviceUnlock(
|
|
|
|
@ApiParam(name = "deviceIDs", value = "DeviceIds to be enable device unlock operation")
|
|
|
|
@ApiParam(name = "deviceIDs", value = "DeviceIds to be enable device unlock operation")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
@ -190,6 +198,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
code = 500,
|
|
|
|
code = 500,
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new get-location operation.")})
|
|
|
|
"Server error occurred while adding a new get-location operation.")})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:location", name = "Get device location", description = "")
|
|
|
|
Response getDeviceLocation(
|
|
|
|
Response getDeviceLocation(
|
|
|
|
@ApiParam(name = "deviceIDs", value = "DeviceIDs to be requested to get device location")
|
|
|
|
@ApiParam(name = "deviceIDs", value = "DeviceIDs to be requested to get device location")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
@ -242,6 +251,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new clear password operation.")
|
|
|
|
"Server error occurred while adding a new clear password operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:clear-password", name = "Clear password of device", description = "")
|
|
|
|
Response removePassword(
|
|
|
|
Response removePassword(
|
|
|
|
@ApiParam(name = "deviceIDs",
|
|
|
|
@ApiParam(name = "deviceIDs",
|
|
|
|
value = "DeviceIds to be requested to remove password") List<String> deviceIDs);
|
|
|
|
value = "DeviceIds to be requested to remove password") List<String> deviceIDs);
|
|
|
@ -294,6 +304,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new control camera operation.")
|
|
|
|
"Server error occurred while adding a new control camera operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:camera", name = "Enable/Disable camera", description = "")
|
|
|
|
Response configureCamera(
|
|
|
|
Response configureCamera(
|
|
|
|
@ApiParam(name = "cameraBeanWrapper", value = "Camera enable/disable configurations with device IDs")
|
|
|
|
@ApiParam(name = "cameraBeanWrapper", value = "Camera enable/disable configurations with device IDs")
|
|
|
|
CameraBeanWrapper cameraBeanWrapper);
|
|
|
|
CameraBeanWrapper cameraBeanWrapper);
|
|
|
@ -349,6 +360,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new device info operation.")
|
|
|
|
"Server error occurred while adding a new device info operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:info", name = "Get device information", description = "")
|
|
|
|
Response getDeviceInformation(
|
|
|
|
Response getDeviceInformation(
|
|
|
|
@ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device information")
|
|
|
|
@ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device information")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
@ -457,6 +469,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
code = 500,
|
|
|
|
code = 500,
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a enterprise wipe operation.")})
|
|
|
|
"Server error occurred while adding a enterprise wipe operation.")})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:enterprise-wipe", name = "Enterprise wipe", description = "")
|
|
|
|
Response wipeDevice(@ApiParam(name = "deviceIDs", value = "Device IDs to be requested to do enterprise-wipe")
|
|
|
|
Response wipeDevice(@ApiParam(name = "deviceIDs", value = "Device IDs to be requested to do enterprise-wipe")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
|
|
|
|
|
|
|
|
@ -508,6 +521,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
code = 500,
|
|
|
|
code = 500,
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a device wipe operation.")})
|
|
|
|
"Server error occurred while adding a device wipe operation.")})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:wipe", name = "Factory reset device", description = "")
|
|
|
|
Response wipeData(
|
|
|
|
Response wipeData(
|
|
|
|
@ApiParam(name = "wipeDataBeanWrapper", value = "Configurations and DeviceIds needed to do wipe-data")
|
|
|
|
@ApiParam(name = "wipeDataBeanWrapper", value = "Configurations and DeviceIds needed to do wipe-data")
|
|
|
|
WipeDataBeanWrapper wipeDataBeanWrapper);
|
|
|
|
WipeDataBeanWrapper wipeDataBeanWrapper);
|
|
|
@ -564,6 +578,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new get-applications operation.")
|
|
|
|
"Server error occurred while adding a new get-applications operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:applications", name = "Get installed applications", description = "")
|
|
|
|
Response getApplications(
|
|
|
|
Response getApplications(
|
|
|
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed to get applications that are already installed")
|
|
|
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed to get applications that are already installed")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
@ -616,6 +631,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new device ring operation.")
|
|
|
|
"Server error occurred while adding a new device ring operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:ring", name = "Ring device", description = "")
|
|
|
|
Response ringDevice(
|
|
|
|
Response ringDevice(
|
|
|
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed for ring")
|
|
|
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed for ring")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
@ -668,6 +684,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new device reboot operation.")
|
|
|
|
"Server error occurred while adding a new device reboot operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:reboot", name = "Reboot device", description = "")
|
|
|
|
Response rebootDevice(
|
|
|
|
Response rebootDevice(
|
|
|
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed for reboot.")
|
|
|
|
@ApiParam(name = "deviceIDs", value = "Device Ids needed for reboot.")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
@ -720,6 +737,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
"Server error occurred while adding a new device mute operation.")
|
|
|
|
"Server error occurred while adding a new device mute operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
@Path("/mute")
|
|
|
|
@Path("/mute")
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:mute", name = "Mute device", description = "")
|
|
|
|
Response muteDevice(
|
|
|
|
Response muteDevice(
|
|
|
|
@ApiParam(name = "deviceIDs", value = "DeviceIDs need to be muted")
|
|
|
|
@ApiParam(name = "deviceIDs", value = "DeviceIDs need to be muted")
|
|
|
|
List<String> deviceIDs);
|
|
|
|
List<String> deviceIDs);
|
|
|
@ -775,6 +793,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new install-application operation.")
|
|
|
|
"Server error occurred while adding a new install-application operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:install-app", name = "Install applications", description = "")
|
|
|
|
Response installApplication(
|
|
|
|
Response installApplication(
|
|
|
|
@ApiParam(name = "applicationInstallationBeanWrapper", value = "Properties of installed apps and device IDs")
|
|
|
|
@ApiParam(name = "applicationInstallationBeanWrapper", value = "Properties of installed apps and device IDs")
|
|
|
|
ApplicationInstallationBeanWrapper applicationInstallationBeanWrapper);
|
|
|
|
ApplicationInstallationBeanWrapper applicationInstallationBeanWrapper);
|
|
|
@ -830,6 +849,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new update-application operation.")
|
|
|
|
"Server error occurred while adding a new update-application operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:update-app", name = "Update installed applications", description = "")
|
|
|
|
Response updateApplication(
|
|
|
|
Response updateApplication(
|
|
|
|
@ApiParam(name = "applicationUpdateBeanWrapper", value = "Properties of updated apps and device IDs")
|
|
|
|
@ApiParam(name = "applicationUpdateBeanWrapper", value = "Properties of updated apps and device IDs")
|
|
|
|
ApplicationUpdateBeanWrapper applicationUpdateBeanWrapper);
|
|
|
|
ApplicationUpdateBeanWrapper applicationUpdateBeanWrapper);
|
|
|
@ -882,6 +902,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new uninstall-application operation.")
|
|
|
|
"Server error occurred while adding a new uninstall-application operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:uninstall-app", name = "Uninstall applications", description = "")
|
|
|
|
Response uninstallApplication(
|
|
|
|
Response uninstallApplication(
|
|
|
|
@ApiParam(name = "applicationUninstallationBeanWrapper",
|
|
|
|
@ApiParam(name = "applicationUninstallationBeanWrapper",
|
|
|
|
value = "applicationUninstallationConfigs and Device Ids")
|
|
|
|
value = "applicationUninstallationConfigs and Device Ids")
|
|
|
@ -936,6 +957,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new blacklist-applications operation.")
|
|
|
|
"Server error occurred while adding a new blacklist-applications operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:blacklist-app", name = "Blacklist applications", description = "")
|
|
|
|
Response blacklistApplications(
|
|
|
|
Response blacklistApplications(
|
|
|
|
@ApiParam(name = "blacklistApplicationsBeanWrapper", value = "BlacklistApplications " +
|
|
|
|
@ApiParam(name = "blacklistApplicationsBeanWrapper", value = "BlacklistApplications " +
|
|
|
|
"Configuration and DeviceIds")
|
|
|
|
"Configuration and DeviceIds")
|
|
|
@ -990,6 +1012,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new upgrade firmware operation.")
|
|
|
|
"Server error occurred while adding a new upgrade firmware operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:upgrade", name = "Upgrade firmware", description = "")
|
|
|
|
Response upgradeFirmware(
|
|
|
|
Response upgradeFirmware(
|
|
|
|
@ApiParam(name = "upgradeFirmwareBeanWrapper",
|
|
|
|
@ApiParam(name = "upgradeFirmwareBeanWrapper",
|
|
|
|
value = "Firmware upgrade configuration and DeviceIds")
|
|
|
|
value = "Firmware upgrade configuration and DeviceIds")
|
|
|
@ -1044,6 +1067,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new configure VPN operation.")
|
|
|
|
"Server error occurred while adding a new configure VPN operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:vpn", name = "Add VPN profiles", description = "")
|
|
|
|
Response configureVPN(
|
|
|
|
Response configureVPN(
|
|
|
|
@ApiParam(name = "vpnBeanWrapper",
|
|
|
|
@ApiParam(name = "vpnBeanWrapper",
|
|
|
|
value = "VPN configuration and DeviceIds")
|
|
|
|
value = "VPN configuration and DeviceIds")
|
|
|
@ -1097,6 +1121,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new send notification operation.")
|
|
|
|
"Server error occurred while adding a new send notification operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:notification", name = "Send notifications", description = "")
|
|
|
|
Response sendNotification(
|
|
|
|
Response sendNotification(
|
|
|
|
@ApiParam(name = "notificationBeanWrapper",
|
|
|
|
@ApiParam(name = "notificationBeanWrapper",
|
|
|
|
value = "Notification Configurations and device Ids")
|
|
|
|
value = "Notification Configurations and device Ids")
|
|
|
@ -1150,6 +1175,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new configure wifi operation.")
|
|
|
|
"Server error occurred while adding a new configure wifi operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:wifi", name = "Add WiFi configurations", description = "")
|
|
|
|
Response configureWifi(
|
|
|
|
Response configureWifi(
|
|
|
|
@ApiParam(name = "wifiBeanWrapper",
|
|
|
|
@ApiParam(name = "wifiBeanWrapper",
|
|
|
|
value = "WifiConfigurations and Device Ids") WifiBeanWrapper wifiBeanWrapper);
|
|
|
|
value = "WifiConfigurations and Device Ids") WifiBeanWrapper wifiBeanWrapper);
|
|
|
@ -1202,6 +1228,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new encrypt storage operation.")
|
|
|
|
"Server error occurred while adding a new encrypt storage operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:encrypt", name = "Encrypt device", description = "")
|
|
|
|
Response encryptStorage(
|
|
|
|
Response encryptStorage(
|
|
|
|
@ApiParam(name = "encryptionBeanWrapper",
|
|
|
|
@ApiParam(name = "encryptionBeanWrapper",
|
|
|
|
value = "Configurations and deviceIds need to be done data encryption")
|
|
|
|
value = "Configurations and deviceIds need to be done data encryption")
|
|
|
@ -1255,6 +1282,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new change lock code operation.")
|
|
|
|
"Server error occurred while adding a new change lock code operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:change-lock", name = "Change password of device", description = "")
|
|
|
|
Response changeLockCode(
|
|
|
|
Response changeLockCode(
|
|
|
|
@ApiParam(name = "lockCodeBeanWrapper",
|
|
|
|
@ApiParam(name = "lockCodeBeanWrapper",
|
|
|
|
value = "Configurations and device Ids need to be done change lock code")
|
|
|
|
value = "Configurations and device Ids need to be done change lock code")
|
|
|
@ -1308,6 +1336,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new set password policy operation.")
|
|
|
|
"Server error occurred while adding a new set password policy operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:password-policy", name = "Set password policy", description = "")
|
|
|
|
Response setPasswordPolicy(
|
|
|
|
Response setPasswordPolicy(
|
|
|
|
@ApiParam(name = "passwordPolicyBeanWrapper",
|
|
|
|
@ApiParam(name = "passwordPolicyBeanWrapper",
|
|
|
|
value = "Password Policy Configurations and Device Ids")
|
|
|
|
value = "Password Policy Configurations and Device Ids")
|
|
|
@ -1361,6 +1390,7 @@ public interface DeviceManagementAdminService {
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
"Server error occurred while adding a new set webclip operation.")
|
|
|
|
"Server error occurred while adding a new set webclip operation.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
@Scope(key = "device:android:operation:webclip", name = "Add webclips", description = "")
|
|
|
|
Response setWebClip(
|
|
|
|
Response setWebClip(
|
|
|
|
@ApiParam(name = "webClipBeanWrapper",
|
|
|
|
@ApiParam(name = "webClipBeanWrapper",
|
|
|
|
value = "Configurations to need set web clip on device and device Ids")
|
|
|
|
value = "Configurations to need set web clip on device and device Ids")
|
|
|
|