diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidPlatformConfiguration.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidPlatformConfiguration.java index cf40ad5067..9832c3f035 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidPlatformConfiguration.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/AndroidPlatformConfiguration.java @@ -36,7 +36,7 @@ import java.util.List; @XmlAccessorType(XmlAccessType.NONE) @ApiModel( value = "PlatformConfiguration", - description = "This class carries all information related to a Tenant configuration" + description = "This class carries all the information related to Android platform configurations." ) public class AndroidPlatformConfiguration implements Serializable { public static final int INVALID_NOTIFIER_FREQUENCY = -1; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java index 30dcb47041..d45f466b07 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementAdminService.java @@ -21,6 +21,7 @@ package org.wso2.carbon.mdm.services.android.services; import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.Permission; +import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.mdm.services.android.bean.wrapper.*; @@ -48,16 +49,16 @@ public interface DeviceManagementAdminService { @ApiOperation( consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Adds a Device Lock on Android Devices", + value = "Adding a Screen Lock on Android devices", notes = "Using this API you have the option of hard locking an Android device, where the Administrator " + - "permanently locks the device or screen locking an Android device", + "permanently locks the device or screen locking an Android device.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device lock operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the device lock operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -72,11 +73,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified. \n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -86,37 +87,41 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported.\n"), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new lock operation.") + "Server error occurred while locking the device.") }) @Permission(name = "Lock Device", permission = "/device-mgt/devices/owning-device/operations/android/lock") Response configureDeviceLock( - @ApiParam(name = "deviceLockBeanWrapper", - value = "Device lock configurations with device IDs") DeviceLockBeanWrapper deviceLockBeanWrapper); + @ApiParam( + name = "deviceLock", + value = "Provide the ID of the Android device, the message that needs to be sent out when locking the device, " + + "and define true as the value if you need to hard lock the device or define false as the value to " + + "screen lock the device." + + "Multiple device IDs can be added by using comma separated values. ", + required = true) DeviceLockBeanWrapper deviceLockBeanWrapper); @POST @Path("/unlock-devices") @ApiOperation( consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Adding a Device Unlock on Android Devices", + value = "Unlocking Android Devices", responseContainer = "List", - notes = "Using this API you have the option of unlocking an Android device, where the Administrator " + - "unlocks the device", + notes = "Unlock devices that were locked permanently using the hard lock operation. Devices that are hard locked can only be unlocked by the EMM administrator.", response = Activity.class, tags = "Android Device Management Administrative Service") @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device un-lock operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the device unlock operation.", response = Activity.class, responseHeaders = { @ResponseHeader( name = "Content-Location", - description = "URL of the activity instance that refers to the scheduled operation."), + description = "The URL of the activity instance that refers to the scheduled operation."), @ResponseHeader( name = "Content-Type", description = "Content type of the body"), @@ -126,11 +131,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -140,15 +145,18 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new un-lock operation.") + "Server error occurred while unlocking the device.") }) @Permission(name = "Unlock Device", permission = "/device-mgt/devices/owning-device/operations/android/unlock") Response configureDeviceUnlock( - @ApiParam(name = "deviceIDs", value = "DeviceIds to be enable device unlock operation") + @ApiParam( + name = "deviceIDs", + value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", + required = true) List deviceIDs); @@ -157,9 +165,10 @@ public interface DeviceManagementAdminService { @ApiOperation( consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Requesting Location Coordinates of Android Devices", + value = "Requesting Location Coordinates", responseContainer = "List", - notes = "Request location coordinates of Android devices", + notes = "Request location coordinates of Android devices. \n" + + "Example: In situations where you have lost your device and need to find out where it is, you can use this REST API to get the location of the device.", response = Activity.class, tags = "Android Device Management Administrative Service") @ApiResponses(value = { @@ -180,11 +189,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -194,14 +203,17 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + "Server error occurred while adding a new get-location operation.")}) @Permission(name = "Get Device Location", permission = "/device-mgt/devices/owning-device/operations/android/location") Response getDeviceLocation( - @ApiParam(name = "deviceIDs", value = "DeviceIDs to be requested to get device location") + @ApiParam( + name = "deviceIDs", + value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", + required = true) List deviceIDs); @POST @@ -212,12 +224,12 @@ public interface DeviceManagementAdminService { value = "Clearing the Password on Android Devices", notes = "Clear the password on Android devices", response = Activity.class, - tags = "Android Device Management Administrative Service" + tags = "Android Device Management Administrative Service." ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Clear password operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the clear password operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -232,11 +244,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified the last time.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -246,7 +258,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -255,7 +267,8 @@ public interface DeviceManagementAdminService { @Permission(name = "Clear Password of Device", permission = "/device-mgt/devices/owning-device/operations/android/clear-password") Response removePassword( @ApiParam(name = "deviceIDs", - value = "DeviceIds to be requested to remove password") List deviceIDs); + value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", + required = true) List deviceIDs); @POST @Path("/control-camera") @@ -263,14 +276,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Enabling or Disabling the Camera on Android Devices", - notes = "Enable or disable the camera on Android devices", + notes = "Enable or disable the camera on Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Control camera operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the camera control operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -285,11 +298,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -299,15 +312,21 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new control camera operation.") + "Server error occurred while adding the new camera control operation.") }) @Permission(name = "Manage Camera", permission = "/device-mgt/devices/owning-device/operations/android/camera") Response configureCamera( - @ApiParam(name = "cameraBeanWrapper", value = "Camera enable/disable configurations with device IDs") + @ApiParam( + name = "cameraControl", + value = "Define the properties to enable/disable the camera. " + + "Disable the camera on the device by assigning true as the value or enable the " + + "camera on the device to function by defining false as the value and the ID of the Android device. " + + "Multiple device IDs can be added by using comma separated values. ", + required = true) CameraBeanWrapper cameraBeanWrapper); @POST @@ -326,7 +345,7 @@ public interface DeviceManagementAdminService { @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device info operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the device info operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -341,11 +360,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -355,7 +374,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -363,7 +382,10 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Get Device Information", permission = "/device-mgt/devices/owning-device/operations/android/info") Response getDeviceInformation( - @ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device information") + @ApiParam( + name = "deviceIds", + value = "Provide the device ID of the Android device. Multiple device IDs can be added by using comma separated values.", + required = true) List deviceIDs); @POST @@ -372,17 +394,17 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Requesting logcat from Android Devices", + value = "Requesting Logcat Details from Android Devices", notes = "Using this REST API you are able to request for Android device log details. Once this REST API is" + " executed it will be in the Android operation queue until the device calls the server to retrieve " + - "the list of operations that needs to be executed on the device", + "the list of operations that needs to be executed on the device.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device logcat operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the operation to get the logcat details.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -397,11 +419,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -411,7 +433,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -419,7 +441,10 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Get Logs", permission = "/device-mgt/devices/owning-device/operations/android/logcat") Response getDeviceLogcat( - @ApiParam(name = "deviceIds", value = "Device IDs to be requested to get device logcat") + @ApiParam( + name = "deviceIds", + value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values.", + required = true) List deviceIDs); @POST @@ -430,14 +455,14 @@ public interface DeviceManagementAdminService { httpMethod = "POST", value = "Enterprise Wiping Android Devices", notes = "Enterprise wipe is the process of deleting enterprise related data on a device while keeping the " + - "personal data intact. You are able to enterprise wipe Android devices using this REST API", + "personal data intact. You are able to enterprise wipe Android devices using this REST API.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Enterprise wipe operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the enterprise wipe operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -452,11 +477,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified." + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -466,14 +491,18 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a enterprise wipe operation.")}) + "Server error occurred while adding the enterprise wipe operation.")}) @Permission(name = "Enterprise Wipe", permission = "/device-mgt/devices/owning-device/operations/android/enterprise-wipe") - Response wipeDevice(@ApiParam(name = "deviceIDs", value = "Device IDs to be requested to do enterprise-wipe") - List deviceIDs); + Response wipeDevice( + @ApiParam( + name = "deviceIDs", + value = "Provide the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", + required = true) + List deviceIDs); @POST @Path("/wipe") @@ -481,15 +510,15 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Factory Resetting an Android Device", - notes = "Factory rest or erases all the data stored in the Android devices " + - "to restore them back to the original system", + notes = "Factory rest or erase all the data stored on the Android devices " + + "to restore them back to the original system.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device wipe operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the device wipe/factory reset operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -504,11 +533,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -518,14 +547,18 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a device wipe operation.")}) + "Server error occurred while adding the device wipe operation.")}) @Permission(name = "Factory Reset", permission = "/device-mgt/devices/owning-device/operations/android/wipe") Response wipeData( - @ApiParam(name = "wipeDataBeanWrapper", value = "Configurations and DeviceIds needed to do wipe-data") + @ApiParam( + name = "wipeData", + value = "Provide the the passcode, which is the passcode that the Android agent prompts the device owner to set at the time of device enrollment, " + + "to enable the factory reset operation, and the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", + required = true) WipeDataBeanWrapper wipeDataBeanWrapper); @POST @@ -534,18 +567,18 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Requesting the List of Installed Applications on Android Devices", + value = "Getting the List of Installed Applications on Android Devices", notes = "Using this REST API the server requests for the list of applications that are installed on" + " the Android devices. Once this REST API is executed it will be in the Android operation queue " + "until the device calls the server to retrieve the list of operations that needs to be executed " + - "on the device", + "on the device.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Get-applications operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the get-applications operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -560,11 +593,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -574,15 +607,18 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new get-applications operation.") + "Server error occurred while adding the new get-applications operation.") }) @Permission(name = "Get Installed Application", permission = "/device-mgt/devices/owning-device/operations/android/applications") Response getApplications( - @ApiParam(name = "deviceIDs", value = "Device Ids needed to get applications that are already installed") + @ApiParam( + name = "deviceIDs", + value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values." , + required = true) List deviceIDs); @POST @@ -591,14 +627,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Ringing Android Devices", - notes = "Ring Android devices", + notes = "Ring Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device ring operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the device ring operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -613,11 +649,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -627,7 +663,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported.\n"), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -635,7 +671,10 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Ring Device", permission = "/device-mgt/devices/owning-device/operations/android/ring") Response ringDevice( - @ApiParam(name = "deviceIDs", value = "Device Ids needed for ring") + @ApiParam( + name = "deviceIDs", + value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values.", + required = true) List deviceIDs); @POST @@ -644,14 +683,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Rebooting Android Devices", - notes = "Reboot Android devices", + notes = "Reboot or restart your Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device reboot operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the device reboot operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -666,11 +705,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -680,15 +719,18 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported.\n"), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new device reboot operation.") + "Server error occurred while adding the new device reboot operation.") }) @Permission(name = "Reboot Device", permission = "/device-mgt/devices/owning-device/operations/android/reboot") Response rebootDevice( - @ApiParam(name = "deviceIDs", value = "Device Ids needed for reboot.") + @ApiParam( + name = "deviceIDs", + value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values. ", + required = true) List deviceIDs); @POST @@ -696,14 +738,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Muting Android Devices", - notes = "Mute Android devices", + notes = "Mute or enable a silent profile for Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device mute operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the device mute operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -718,11 +760,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -732,7 +774,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -741,7 +783,10 @@ public interface DeviceManagementAdminService { @Path("/mute") @Permission(name = "Mute Device", permission = "/device-mgt/devices/owning-device/operations/android/mute") Response muteDevice( - @ApiParam(name = "deviceIDs", value = "DeviceIDs need to be muted") + @ApiParam( + name = "deviceIDs", + value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values. ", + required = true) List deviceIDs); @POST @@ -751,16 +796,15 @@ public interface DeviceManagementAdminService { produces = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Installing an Application on Android Devices", - notes = "Install an application on an Android device. If the device you are installing the application" + - " on has the WSO2 system service installed, the application installation will happen in silent " + - "mode, else the device user's consent will be required", + notes = "Install an application on an Android device. If the device you are installing the application has the WSO2 system service application installed," + + " the application installation will happen in silent mode, else the device user's consent will be required.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Install application operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the install application operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -775,11 +819,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -789,7 +833,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported.\n"), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -797,7 +841,12 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Install Applications", permission = "/device-mgt/devices/owning-device/operations/android/install-app") Response installApplication( - @ApiParam(name = "applicationInstallationBeanWrapper", value = "Properties of installed apps and device IDs") + @ApiParam( + name = "applicationInstallation", + value = "Properties required to install an application on Android devices. Provide the the package name, type," + + " URL and name of the application, the date and time for the scheduled installation, and the ID of the " + + "Android device. Multiple device IDs can be added by using comma separated values.", + required = true) ApplicationInstallationBeanWrapper applicationInstallationBeanWrapper); @POST @@ -807,16 +856,16 @@ public interface DeviceManagementAdminService { produces = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Updating an Application on Android Devices", - notes = "Update an application on an Android device. If the device you are updating the application" + - " has the WSO2 system service installed, the application update will happen in silent " + - "mode, else the device user's consent will be required", + notes = "Update an application on an Android device. If the device" + + " has the WSO2 system service application installed, the application update will happen in silent " + + "mode, else the device user's consent is required.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Update-application operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the update-application operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -831,11 +880,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -845,15 +894,20 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new update-application operation.") + "Server error occurred while adding the new update-application operation.") }) @Permission(name = "Update installed applications", permission = "/device-mgt/devices/owning-device/operations/android/update-app") Response updateApplication( - @ApiParam(name = "applicationUpdateBeanWrapper", value = "Properties of updated apps and device IDs") + @ApiParam( + name = "applicationUpdate", + value = "Properties required to update an application on Android devices. Provide the the package name, type," + + "URL and name of the application, the date and time for the scheduled installation, and the ID of the" + + "Android device. Multiple device IDs can be added by using comma separated values.", + required = true) ApplicationUpdateBeanWrapper applicationUpdateBeanWrapper); @POST @@ -862,14 +916,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Uninstalling an Application from Android Devices", - notes = "Uninstall an application from Android devices", + notes = "Uninstall an application from Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Uninstall-application operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the uninstall-application operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -884,11 +938,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -898,7 +952,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -906,8 +960,12 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Uninstall Applications", permission = "/device-mgt/devices/owning-device/operations/android/uninstall-app") Response uninstallApplication( - @ApiParam(name = "applicationUninstallationBeanWrapper", - value = "applicationUninstallationConfigs and Device Ids") + @ApiParam( + name = "applicationUninstallation", + value = "Properties required to uninstall an application. Provide the the package name, type," + + "URL and name of the application, the date and time for the scheduled installation, and the ID of the" + + "Android device. Multiple device IDs can be added by using comma separated values.", + required = true) ApplicationUninstallationBeanWrapper applicationUninstallationBeanWrapper); @POST @@ -916,15 +974,18 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Get BlackListed Applications", - notes = "Getting BlackListed Applications", + value = "BlackListing Applications for Android Devices", + notes = "Prevents you from using specific applications. For Android operation systems before Lollipop," + + " when a blacklisted application is clicked a screen is displayed to prevent you from using the app. For the Lollipop" + + " Android operating systems and after, the blacklisted apps will be hidden. Blacklisting can be used on both BYOD and " + + "COPE devices. Applications can be blacklisted via the application restriction policy too.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Blacklist-applications operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the application blacklist operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -939,11 +1000,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -953,16 +1014,19 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported"), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new blacklist-applications operation.") + "Server error occurred while adding the new blacklist-applications operation.") }) @Permission(name = "Blacklist Applications", permission = "/device-mgt/devices/owning-device/operations/android/blacklist-app") Response blacklistApplications( - @ApiParam(name = "blacklistApplicationsBeanWrapper", value = "BlacklistApplications " + - "Configuration and DeviceIds") + @ApiParam( + name = "blacklistApplications", + value = "The properties required to blacklist applications. Provide the package name of the application to be blacklisted," + + " and the ID of the Android device. Multiple device IDs can be added by using comma separated values. ", + required = true) @Valid BlacklistApplicationsBeanWrapper blacklistApplicationsBeanWrapper); @POST @@ -971,15 +1035,15 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Upgrading device firmware", - notes = "Device firmware upgrade", + value = "UUpgrading Firmware of Android Devices", + notes = "Upgrade the firmware of Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Upgrade firmware operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the firmware upgrade operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -994,11 +1058,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1008,7 +1072,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -1016,8 +1080,13 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Upgrade Firmware", permission = "/device-mgt/devices/owning-device/operations/android/upgrade") Response upgradeFirmware( - @ApiParam(name = "upgradeFirmwareBeanWrapper", - value = "Firmware upgrade configuration and DeviceIds") + @ApiParam( + name = "upgradeFirmware", + value = "Properties required to upgrade the firmware. Provide the date and time to schedule the firmware update in the " + + "yyyy-MM-dd'T'HH:mm:ss.SSSXXX format, the OTA upgrade server URL in one of the following formats " + + "(example: http//abc.com, http://abc.com/ota), " + + "and the ID of the Android device. Multiple device IDs can be added by using comma separated values.", + required = true) UpgradeFirmwareBeanWrapper upgradeFirmwareBeanWrapper); @POST @@ -1027,19 +1096,19 @@ public interface DeviceManagementAdminService { produces = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Configuring VPN on Android devices", - notes = "Configure VPN on Android devices", + notes = "Configure VPN on Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Configure VPN operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the configure VPN operation.", response = Activity.class, responseHeaders = { @ResponseHeader( name = "Content-Location", - description = "URL of the activity instance that refers to the scheduled operation."), + description = "The URL of the activity instance that refers to the scheduled operation."), @ResponseHeader( name = "Content-Type", description = "Content type of the body"), @@ -1049,11 +1118,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified." + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1063,16 +1132,18 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new configure VPN operation.") + "Server error occurred while configuring the VPN.") }) @Permission(name = "Add VPN", permission = "/device-mgt/devices/owning-device/operations/android/vpn") Response configureVPN( - @ApiParam(name = "vpnBeanWrapper", - value = "VPN configuration and DeviceIds") + @ApiParam( + name = "vpnBean", + value = "VPN configuration and DeviceIds", + required = true) VpnBeanWrapper vpnBeanWrapper); @POST @@ -1081,14 +1152,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Sending a Notification to Android Devices", - notes = "Send a notification to Android devices", + notes = "Send a notification or message to Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Send notification operation has successfully been scheduled", + message = "Created. \n Successfully sent the notification.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -1103,11 +1174,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1117,7 +1188,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -1125,8 +1196,11 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Send Notifications", permission = "/device-mgt/devices/owning-device/operations/android/send-notification") Response sendNotification( - @ApiParam(name = "notificationBeanWrapper", - value = "Notification Configurations and device Ids") + @ApiParam( + name = "notification", + value = "The properties required to send a notification. Provide the message you wish to send and the ID of the " + + "Android device. Multiple device IDs can be added by using comma separated values.", + required = true) NotificationBeanWrapper notificationBeanWrapper); @POST @@ -1135,14 +1209,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Configuring Wi-Fi on Android Devices", - notes = "Configure Wi-Fi on Android devices", + notes = "Configure Wi-Fi on Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Configure wifi operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the configure Wi-Fi operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -1157,11 +1231,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified." + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1171,16 +1245,21 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new configure wifi operation.") + "Server error occurred while configuring Wi-Fi.") }) @Permission(name = "Add Wifi Configuration", permission = "/device-mgt/devices/owning-device/operations/android/wifi") Response configureWifi( - @ApiParam(name = "wifiBeanWrapper", - value = "WifiConfigurations and Device Ids") WifiBeanWrapper wifiBeanWrapper); + @ApiParam( + name = "wifi", + value = "The properties required to configure Wi-Fi. Provide the password to connect to the specified Wi-Fi network," + + "the ssid or the name of the Wi-Fi network that you wish to configure and the ID of the Android device." + + " Multiple device IDs can be added by using comma separated values.", + required = true) + WifiBeanWrapper wifiBeanWrapper); @POST @Path("/encrypt-storage") @@ -1188,14 +1267,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Encrypting Storage on Android Devices", - notes = "Encrypt the data stored on Android devices", + notes = "Encrypt the data stored on Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Encrypt storage operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the encrypt storage operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -1210,11 +1289,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified." + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1224,7 +1303,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -1232,8 +1311,12 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Encrypt Device", permission = "/device-mgt/devices/owning-device/operations/android/encrypt") Response encryptStorage( - @ApiParam(name = "encryptionBeanWrapper", - value = "Configurations and deviceIds need to be done data encryption") + @ApiParam( + name = "encryption", + value = "Properties required to encrypt the storage. Encrypt the storage on the device by assigning " + + "true as the value or do not encrypt the storage on the device by assigning false as the value and " + + "provide the ID of the Android device. Multiple device IDs can be added by using comma separated values.", + required = true) EncryptionBeanWrapper encryptionBeanWrapper); @POST @@ -1242,14 +1325,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Changing the Lock Code on Android Devices", - notes = "Change the lock code on Android devices", + notes = "Change the lock code on Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Change lock code operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the change lock code operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -1264,11 +1347,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1278,7 +1361,7 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -1286,8 +1369,12 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Change Password of Device", permission = "/device-mgt/devices/owning-device/operations/android/change-lock-code") Response changeLockCode( - @ApiParam(name = "lockCodeBeanWrapper", - value = "Configurations and device Ids need to be done change lock code") + @ApiParam( + name = "lockCode", + value = "The properties to change th lock code. Provide the lock code that will replace the current lock code on Android devices and " + + "the ID of the Android device. Multiple device IDs can be added by using comma separated values. " + + "If a passcode policy has been set in EMM, the lock code should comply to the passcode policy.\t", + required = true) LockCodeBeanWrapper lockCodeBeanWrapper); @POST @@ -1295,15 +1382,15 @@ public interface DeviceManagementAdminService { @ApiOperation( consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Setting a Passcode Policy on Android Devices", - notes = "Set a password policy on Android devices", + value = "Setting a Password Policy on Android Devices", + notes = "Set a password policy on Android devices.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Set password policy operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the set password policy operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -1318,11 +1405,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1340,8 +1427,10 @@ public interface DeviceManagementAdminService { }) @Permission(name = "Set Password Policy", permission = "/device-mgt/devices/owning-device/operations/android/password-policy") Response setPasswordPolicy( - @ApiParam(name = "passwordPolicyBeanWrapper", - value = "Password Policy Configurations and Device Ids") + @ApiParam( + name = "passwordPolicy", + value = "The properties required to set a password policy.", + required = true) PasswordPolicyBeanWrapper passwordPolicyBeanWrapper); @POST @@ -1350,14 +1439,14 @@ public interface DeviceManagementAdminService { consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Setting a Web Clip on Android Devices", - notes = "Set a web clip on Android devices. A web clip is used to add a bookmark to a web application", + notes = "Set a web clip on Android devices. A web clip is used to add a bookmark to a web application.", response = Activity.class, tags = "Android Device Management Administrative Service" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Set webclip operation has successfully been scheduled", + message = "Created. \n Successfully scheduled the set web clip operation.", response = Activity.class, responseHeaders = { @ResponseHeader( @@ -1372,11 +1461,11 @@ public interface DeviceManagementAdminService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -1386,16 +1475,18 @@ public interface DeviceManagementAdminService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while adding a new set webclip operation.") + "Server error occurred while adding adding a the set web clip operation.") }) @Permission(name = "Add Webclips", permission = "/device-mgt/devices/owning-device/operations/android/webclip") Response setWebClip( - @ApiParam(name = "webClipBeanWrapper", - value = "Configurations to need set web clip on device and device Ids") + @ApiParam( + name = "webClip", + value = "The properties to set the web clip.", + required = true) WebClipBeanWrapper webClipBeanWrapper); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java index 66b84a875f..e7731778e6 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceManagementService.java @@ -39,7 +39,7 @@ import java.util.List; tags = {"devicemgt_android"}) @Api(value = "Android Device Management", - description = "This carries all the resources related to Android device management functionalities") + description = "This carries all the resources related to the Android device management functionalities.") @Path("/devices") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @@ -51,13 +51,14 @@ public interface DeviceManagementService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Update the application list of a device", + value = "Updating the Application Details on Android Devices", + notes = "Update the details of the applications that are installed on Android devices.", tags = "Android Device Management" ) @ApiResponses(value = { @ApiResponse( code = 200, - message = "OK. \n Application list has been updated successfully", + message = "OK. \n Successfully updated the application details.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -71,17 +72,17 @@ public interface DeviceManagementService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 400, message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -91,14 +92,14 @@ public interface DeviceManagementService { Response updateApplicationList( @ApiParam( name = "id", - value = "Device Identifier") + value = "The unique device identifier.") @NotNull @Size(min = 2 , max = 45) @Pattern(regexp = "^[A-Za-z0-9]*$") @PathParam("id") String id, @ApiParam( name = "applications", - value = "List of applications that need to be persisted against the device") + value = "The properties to update application details. Multiple applications can be updated using comma separated values.") List androidApplications); @PUT @@ -106,16 +107,18 @@ public interface DeviceManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Get the operation list pending for the device", + value = "Getting the Pending Operation List", responseContainer = "List", notes = "The Android agent communicates with the server to get the operations that are queued up " + - "at the server end for a given device using via this particular resource", + "at the server end via this REST API." + + " While getting the pending operations the details of the operations executed at the device end is shared with the server. " + + "The server then updates the status of the operations that were carried out on the device.", response = Operation.class, tags = "Android Device Management") @ApiResponses(value = { @ApiResponse( code = 200, - message = "OK. \n Successfully fetched the pending application list of the Android device.", + message = "OK. \n Successfully fetched the pending operations of the Android device.", response = Operation.class, responseContainer = "List", responseHeaders = { @@ -128,33 +131,36 @@ public interface DeviceManagementService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.") }), @ApiResponse( code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."), + message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported"), @ApiResponse( code = 500, - message = "Internal Server Error. \n Server error occurred while fetching policies.") + message = "Internal Server Error. \n Server error occurred while fetching the list of pending operations.") }) @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android") Response getPendingOperations( @ApiParam( name = "id", - value = "Device Identifier") + value = "The unique device identifier.", + required = true) @PathParam("id") String id, @ApiParam( name = "If-Modified-Since", - value = "Validates if the requested variant has not been modified since the time specified", + value = "Checks if the requested variant was modified, since the specified date-time.\n" + + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + + "Example: Mon, 05 Jan 2014 15:10:00 +0200.", required = false) @HeaderParam("If-Modified-Since") String ifModifiedSince, @ApiParam( name = "resultOperations", - value = "Device Operation Status") + value = "Properties to update the device operations and their status.") List resultOperations); @POST @@ -162,17 +168,17 @@ public interface DeviceManagementService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Register an Android Device", - notes = "When carrying out device registration via an Android device, you need to initially install" + - " an Android Agent on the device, before being able to register the device with WSO2 EMM. Instead," + + value = "Registering an Android Device", + notes = "When registering an Android device, you need to install" + + " the Android Agent on the device, before being able to register the device with WSO2 EMM. Instead," + " you can use this REST API to register an Android device with WSO2 EMM, without having to install" + - " an Android Agent on the respective device", + " an Android Agent. This API can be mainly used to test the device enrollment process.", tags = "Android Device Management" ) @ApiResponses(value = { @ApiResponse( code = 201, - message = "Created. \n Device enrollment has successfully been created", + message = "Created. \n Successfully created an instance of the device.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -186,11 +192,11 @@ public interface DeviceManagementService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -200,14 +206,16 @@ public interface DeviceManagementService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported.\n"), @ApiResponse( code = 500, message = "Internal Server Error. \n " + "Server error occurred while adding a new device.") }) @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android") - Response enrollDevice(@ApiParam(name = "device", value = "Device Information to be enroll") + Response enrollDevice(@ApiParam( + name = "device", + value = "The properties required to enroll a device.") @Valid AndroidDevice device); @GET @@ -215,7 +223,7 @@ public interface DeviceManagementService { @ApiOperation( httpMethod = "GET", value = "Getting the Registration Status of an Android Device", - notes = "Use this REST API to retrieve the registration status of an Android device", + notes = "Use this REST API to retrieve the registration status of an Android device.", tags = "Android Device Management" ) @ApiResponses(value = { @@ -232,12 +240,12 @@ public interface DeviceManagementService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests."), }), @ApiResponse( code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."), + message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported"), @@ -249,11 +257,13 @@ public interface DeviceManagementService { Response isEnrolled( @ApiParam( name = "id", - value = "Device Identifier") + value = "The unique device identifier") @PathParam("id") String id, @ApiParam( name = "If-Modified-Since", - value = "Validates if the requested variant has not been modified since the time specified", + value = "Checks if the requested variant was modified, since the specified date-time.\n" + + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + + "Example: Mon, 05 Jan 2014 15:10:00 +0200", required = false) @HeaderParam("If-Modified-Since") String ifModifiedSince); @@ -262,14 +272,14 @@ public interface DeviceManagementService { @ApiOperation( httpMethod = "PUT", value = "Updating the Registration Details of an Android Device", - notes = "Use this REST API to update the registration details of an Android device", + notes = "Use this REST API to update the registration details of an Android device.", tags = "Android Device Management" ) @ApiResponses( value = { @ApiResponse( code = 200, - message = "OK. \n Device enrollment has been updated successfully", + message = "OK. \n Successfully updated the device enrollment details.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -283,17 +293,17 @@ public interface DeviceManagementService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 400, message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -303,27 +313,27 @@ public interface DeviceManagementService { Response modifyEnrollment( @ApiParam( name = "id", - value = "Device Identifier") + value = "The unique device identifier.") @PathParam("id") String id, @ApiParam( name = "device", - value = "Device information to be modify") @Valid AndroidDevice androidDevice); + value = "The properties of required to update device enrollment details.") @Valid AndroidDevice androidDevice); @DELETE @Path("/{id}") @ApiOperation( httpMethod = "DELETE", - value = "Un-register an Android Device", - notes = "Use this REST API to un-register a specific Android device", + value = "Unregistering an Android Device", + notes = "Use this REST API to unregister an Android device.", tags = "Android Device Management" ) @ApiResponses(value = { @ApiResponse( code = 200, - message = "OK. \n Device has successfully been dis-enrolled"), + message = "OK. \n Successfully disenrolled the device."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -333,7 +343,7 @@ public interface DeviceManagementService { Response disEnrollDevice( @ApiParam( name = "id", - value = "Device Identifier") + value = "The unique device identifier.") @PathParam("id") String id); } diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java index e5e42f31f3..dba8b4afd3 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/DeviceTypeConfigurationService.java @@ -34,8 +34,7 @@ import javax.ws.rs.core.Response; context = "api/device-mgt/android/v1.0/configuration", tags = {"devicemgt_android"}) -@Api(value = "Android Configuration Management", description = "This API carries all resource associated with " + - "manipulating the general configurations of Android platform") +@Api(value = "Android Configuration Management", description = "This API carries all the resource used to mange the Android platform configurations.") @Path("/configuration") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @@ -46,14 +45,14 @@ public interface DeviceTypeConfigurationService { produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Getting Android Platform Configurations", - notes = "Get the Android platform configuration details using this REST API", + notes = "Get the Android platform configuration details using this REST API.", response = PlatformConfiguration.class, tags = "Android Configuration Management" ) @ApiResponses(value = { @ApiResponse( code = 200, - message = "OK. \n Successfully fetched Android platform configuration.", + message = "OK. \n Successfully fetched the Android platform configurations.", response = PlatformConfiguration.class, responseHeaders = { @ResponseHeader( @@ -65,27 +64,29 @@ public interface DeviceTypeConfigurationService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests."), }), @ApiResponse( code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."), + message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported"), @ApiResponse( code = 500, - message = "Internal Server Error. \n Server error occurred while fetching Android platform configuration.") + message = "Internal Server Error. \n Server error occurred while fetching the Android platform configuration.") }) @Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view") Response getConfiguration( @ApiParam( name = "If-Modified-Since", - value = "Validates if the requested variant has not been modified since the time specified", + value = "Checks if the requested variant was modified, since the specified date-time.\n" + + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + + "Example: Mon, 05 Jan 2014 15:10:00 +0200", required = false) @HeaderParam("If-Modified-Since") String ifModifiedSince); @@ -94,14 +95,14 @@ public interface DeviceTypeConfigurationService { consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Updating Android Platform Configuration.", + value = "Updating Android Platform Configurations", notes = "Update the Android platform configurations using this REST API.", tags = "Android Configuration Management" ) @ApiResponses(value = { @ApiResponse( code = 200, - message = "OK. \n Android platform configuration has been updated successfully", + message = "OK. \n Successfully updated the Android platform configurations.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -115,26 +116,26 @@ public interface DeviceTypeConfigurationService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 400, message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while modifying Android platform configuration.") + "Server error occurred while modifying the Android platform configuration.") }) @Permission(name = "Manage Configurations", permission = "/device-mgt/platform-configurations/manage") Response updateConfiguration( @ApiParam(name = "configuration", - value = "AndroidPlatformConfiguration") + value = "The properties to update the Android platform configurations.") @Valid AndroidPlatformConfiguration androidPlatformConfiguration); @GET @@ -143,9 +144,9 @@ public interface DeviceTypeConfigurationService { @ApiOperation( produces = MediaType.TEXT_PLAIN, httpMethod = "GET", - value = "Getting the License Agreement for Android Device Registration", + value = "Getting the License Agreement for the Android Device Registration", notes = "Use this REST API to retrieve the license agreement that is used for the Android device " + - "registration process", + "registration process.", response = String.class, tags = "Android Configuration Management") @ApiResponses(value = { @@ -163,27 +164,29 @@ public interface DeviceTypeConfigurationService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests."), }), @ApiResponse( code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."), + message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 406, message = "Not Acceptable.\n The requested media type is not supported"), @ApiResponse( code = 500, - message = "Internal Server Error. \n Server error occurred while fetching Android license configuration.") + message = "Internal Server Error. \n Server error occurred while fetching the Android license configuration.") }) @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/android") Response getLicense( @ApiParam( name = "If-Modified-Since", - value = "Validates if the requested variant has not been modified since the time specified", + value = "Checks if the requested variant was modified, since the specified date-time.\n" + + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + + "Example: Mon, 05 Jan 2014 15:10:00 +0200.", required = false) @HeaderParam("If-Modified-Since") String ifModifiedSince) throws AndroidAgentException; diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java index 2b2dd0d1e5..c5a607b3a1 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/EventReceiverService.java @@ -35,9 +35,9 @@ import javax.ws.rs.core.Response; context = "api/device-mgt/android/v1.0/events", tags = {"devicemgt_android"}) -@Api(value = "Event Receiver", description = "Event publishing/retrieving related APIs.To enable Eventing need to" + - " configure as ref-https://docs.wso2.com/display/EMM210/Managing+Event+Publishing+with+WSO2+Data+Analytics+Server, " + - "https://docs.wso2.com/display/EMM210/Creating+a+New+Event+Stream+and+Receiver") +@Api(value = "Event Receiver", description = "Event publishing/retrieving related APIs. To enable event publishing/retrieving you need to" + + " configure WSO2 EMM as explained in https://docs.wso2.com/display/EMM220/Managing+Event+Publishing+with+WSO2+Data+Analytics+Server, " + + "https://docs.wso2.com/display/EMM220/Creating+a+New+Event+Stream+and+Receiver") @Path("/events") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @@ -49,13 +49,13 @@ public interface EventReceiverService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Event publishing via REST API.", - notes = "Publish events received by the EMM Android client to WSO2 DAS using this API.", + value = "Publishing Events", + notes = "Publish events received by the WSO2 EMM Android client to the WSO2 Data Analytics Server (DAS) using this API.", tags = "Event Receiver" ) @ApiResponses( value = { - @ApiResponse(code = 201, message = "Created. \n Event is published successfully. Location header " + + @ApiResponse(code = 201, message = "Created. \n Successfully published the event. Location header " + "contains URL of newly enrolled device", responseHeaders = { @ResponseHeader( @@ -70,12 +70,12 @@ public interface EventReceiverService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.") }), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -85,7 +85,7 @@ public interface EventReceiverService { message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + @@ -104,10 +104,10 @@ public interface EventReceiverService { produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Getting event details for a given time period.", - notes = "Get the event details of a device for a given time duration using this API.Request must contain " + - "the device identifier. Optionally, both, date from and date to value should be present to get " + - "alerts between times. Based on device type and the device identifier also filtering can be done" + - "(This cannot be combined with to and from parameters).", + notes = "Get the event details of a device for a given time duration using this API. The request must contain " + + "the device identifier. Optionally, both date from and date to value should be present to get " + + "alerts between a specified time. Filtering can also be done based on the device type and the device identifier." + + "(This cannot be combined with the to and from parameters).", response = DeviceState.class, responseContainer = "List", tags = "Event Receiver" @@ -116,12 +116,11 @@ public interface EventReceiverService { value = { @ApiResponse( code = 200, - message = "OK. \n Event details of a device for a given time duration have been successfully fetched", + message = "OK. \n Successfully fetched the event details of the specified device for a given time duration.", response = DeviceState.class, responseContainer = "List"), @ApiResponse( code = 303, - message = "See Other. \n Source can be retrieved from the URL specified at" + - " the Location header.", + message = "See Other. \n The source can be retrieved from the URL specified in the location header.", responseHeaders = { @ResponseHeader(name = "Content-Location", description = "Source URL of the document.") }), @@ -132,39 +131,44 @@ public interface EventReceiverService { @ApiResponse( code = 400, message = "Bad Request. \n Invalid request or validation error. You must provide" + - " the device identifier. Additionally, the device identifier can be combined with either the type" + - " OR date from and to."), + " the device identifier. Additionally, the device identifier can be combined with either the device type" + + " OR the from and to date."), @ApiResponse( code = 404, - message = "Not Found. \n Resource requested does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 500, - message = "Error occurred while getting published events for specific device.") + message = "Error occurred while getting the published events for the specified device.") }) @Permission(name = "Publish Events to DAS", permission = "/device-mgt/devices/enroll/android") Response retrieveAlerts( @ApiParam( name = "id", - value = "Device Identifier to be need to retrieve events.", + value = "The unique device identifier.", required = true) @Size(min = 2, max = 45) @QueryParam("id") String deviceId, @ApiParam( name = "from", - value = "From Date.") + value = "Specify the time and date from when you want to get the data." + + "Provide the time and date format in the unix/epoch format as the value for {unixTimestamp}. Use a Epoch convertor, to convert the time and date to this format.") @QueryParam("from") long from, @ApiParam( name = "to", - value = "To Date.") + value = "Specify the time and date up to when you require the data." + + "Provide the time and date format in the unix/epoch format as the value for {unixTimestamp}. Use a Epoch convertor, to convert the time and date to this format.") @QueryParam("to") long to, @ApiParam( name = "type", - value = "Type of the Alert to be need to retrieve events.") + value = "The alert type to retrieve the events." + + "Provide APPLICATION_STATE or RUNTIME_STATE as the value.") @Size(min = 2, max = 45) @QueryParam("type") String type, @ApiParam( name = "If-Modified-Since", - value = "Validates if the requested variant has not been modified since the time specified", + value = "Checks if the requested variant was modified, since the specified date-time.\n" + + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + + "Example: Mon, 05 Jan 2014 15:10:00 +0200", required = false) @HeaderParam("If-Modified-Since") String ifModifiedSince); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 7c07ebd285..4f0e65511a 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -51,7 +51,7 @@ - + diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java index 208a667a05..83fa341c9a 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/services/ConfigurationMgtService.java @@ -50,7 +50,7 @@ public interface ConfigurationMgtService { produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Getting Windows Platform Configurations", - notes = "Get the Windows platform configuration details using this REST API", + notes = "Get the Windows platform configuration details using this REST API.", response = PlatformConfiguration.class, tags = "Windows Configuration Management" ) @@ -74,16 +74,16 @@ public interface ConfigurationMgtService { }), @ApiResponse( code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."), + message = "Not Modified. \n Applications can be blacklisted via the application restriction policy too.."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n Th resource to be deleted does not exist."), @ApiResponse( code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), + message = "Not Acceptable.\n The requested media type is not supported."), @ApiResponse( code = 500, - message = "Internal Server Error. \n Server error occurred while fetching Windows platform configuration.") + message = "Internal Server Error. \n Server error occurred while fetching the Windows platform configuration.") }) @Permission(name = "View Configurations", permission = "/device-mgt/platform-configurations/view") PlatformConfiguration getConfiguration() throws WindowsConfigurationException; @@ -100,14 +100,14 @@ public interface ConfigurationMgtService { consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Updating Windows Platform Configuration.", + value = "Updating Windows Platform Configurations", notes = "Update the Windows platform configurations using this REST API.", tags = "Windows Configuration Management" ) @ApiResponses(value = { @ApiResponse( code = 200, - message = "OK. \n Windows platform configuration has been updated successfully", + message = "OK. \n Successfully updated the Windows platform configurations.", responseHeaders = { @ResponseHeader( name = "Content-Location", @@ -121,25 +121,28 @@ public interface ConfigurationMgtService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests.")}), @ApiResponse( code = 400, message = "Bad Request. \n Invalid request or validation error."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 415, - message = "Unsupported media type. \n The entity of the request was in a not supported format."), + message = "Unsupported media type. \n The format of the requested entity was not supported."), @ApiResponse( code = 500, message = "Internal Server Error. \n " + - "Server error occurred while modifying Windows platform configuration.") + "Server error occurred while modifying the Windows platform configurations.") }) @Permission(name = "Manage Configurations", permission = "/device-mgt/configurations/manage") - Message updateConfiguration( @ApiParam(name = "configuration", - value = "PlatformConfiguration")PlatformConfiguration configuration) throws WindowsConfigurationException; + Message updateConfiguration + ( @ApiParam( + name = "configuration", + value = "The properties to update the Windows platform configurations.") + PlatformConfiguration configuration) throws WindowsConfigurationException; @GET @Path("license") @@ -147,9 +150,9 @@ public interface ConfigurationMgtService { @ApiOperation( produces = MediaType.TEXT_PLAIN, httpMethod = "GET", - value = "Getting the License Agreement for Windows Device Registration", + value = "Getting the License Agreement to Register a Windows Device", notes = "Use this REST API to retrieve the license agreement that is used for the Windows device " + - "registration process", + "registration process.", response = String.class, tags = "Windows Configuration Management") @ApiResponses(value = { @@ -167,27 +170,29 @@ public interface ConfigurationMgtService { "Used by caches, or in conditional requests."), @ResponseHeader( name = "Last-Modified", - description = "Date and time the resource has been modified the last time.\n" + + description = "Date and time the resource was last modified.\n" + "Used by caches, or in conditional requests."), }), @ApiResponse( code = 304, - message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."), + message = "Not Modified. \n Empty body because the client already has the latest version of the requested resource."), @ApiResponse( code = 404, - message = "Not Found. \n Resource to be deleted does not exist."), + message = "Not Found. \n The specified resource does not exist."), @ApiResponse( code = 406, - message = "Not Acceptable.\n The requested media type is not supported"), + message = "Not Acceptable.\n The requested media type is not supported."), @ApiResponse( code = 500, - message = "Internal Server Error. \n Server error occurred while fetching Windows license configuration.") + message = "Internal Server Error. \n Server error occurred while fetching the Windows license configuration.") }) @Permission(name = "Enroll Device", permission = "/device-mgt/devices/enroll/windows") Response getLicense( @ApiParam( name = "If-Modified-Since", - value = "Validates if the requested variant has not been modified since the time specified", + value = "Checks if the requested variant was modified, since the specified date-time.\n" + + "Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" + + "Example: Mon, 05 Jan 2014 15:10:00 +0200", required = false) @HeaderParam("If-Modified-Since") String ifModifiedSince) throws WindowsConfigurationException;