From ead0e202d64652585f8f1c770abf71d0f6a93940 Mon Sep 17 00:00:00 2001 From: Shavindri Dissanayake Date: Wed, 7 Mar 2018 19:34:45 +0530 Subject: [PATCH] updating the swagger content --- .../api/ActivityInfoProviderService.java | 25 +++-- .../jaxrs/service/api/DeviceAgentService.java | 64 ++++++------ .../api/DeviceEventManagementService.java | 24 ++--- .../service/api/DeviceManagementService.java | 56 +++++------ .../service/api/GeoLocationBasedService.java | 99 ++++++++++--------- .../service/api/GroupManagementService.java | 75 +++++++------- .../api/NotificationManagementService.java | 4 +- .../service/api/RemoteSessionService.java | 8 +- .../service/api/RoleManagementService.java | 4 +- 9 files changed, 179 insertions(+), 180 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java index 302869e107..9b76fe35c9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java @@ -67,8 +67,7 @@ import javax.ws.rs.core.Response; } ) @Path("/activities") -@Api(value = "Activity Info Provider", description = "Activity related information manipulation. For example" + - " operation details and responses from devices.") +@Api(value = "Getting Activity Details", description = "Get the details of the operations/activities executed by the server on the registered devices during a defined time period.") @Scopes( scopes = { @Scope( @@ -88,9 +87,8 @@ public interface ActivityInfoProviderService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting Details of an Activity", - notes = "Retrieve the details of a specific activity/operation, such as the meta information of " + - "an operation, including the responses from the devices.", + value = "Getting the Details of a Specific Activity", + notes = "Retrieve the details of a specific activity/operation, such as the meta information of an operation, and the responses from the devices.", tags = "Activity Info Provider", extensions = { @Extension(properties = { @@ -142,7 +140,7 @@ public interface ActivityInfoProviderService { Response getActivity( @ApiParam( name = "id", - value = "Activity id of the operation/activity.", + value = "Activity ID of the operation/activity.", required = true, defaultValue = "ACTIVITY_1") @PathParam("id") @@ -161,9 +159,9 @@ public interface ActivityInfoProviderService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting Details of activities for given set of activity/operation Ids", - notes = "Retrieve the details of specific activity/operation Ids, such as the meta information of " + - "an operation, including the responses from the devices.", + value = "Getting Activity Details of Specified Activity/Operation IDs", + notes = "Retrieve the details of activities or operations, such as the meta information of an operation, and the responses from the devices."+ + "Define the activity or operation IDs as comma separated values.", tags = "Activity Info Provider", extensions = { @Extension(properties = { @@ -213,7 +211,7 @@ public interface ActivityInfoProviderService { Response getActivities( @ApiParam( name = "ids", - value = "Comma separated activity/operation ids", + value = "Comma separated activity/operation IDs", required = true, defaultValue = "ACTIVITY_0") @QueryParam("ids") ActivityIdList activityIdList); @@ -224,9 +222,8 @@ public interface ActivityInfoProviderService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting Details of an Activity for a specific device", - notes = "Retrieve the details of a specific activity/operation, such as the meta information of " + - "an operation, including the responses from a given device", + value = "Getting a Specific Activity Details of a Device", + notes = "Retrieve the details of a specific activity/operation, that was sent to a specific device.", tags = "Activity Info Provider", extensions = { @Extension(properties = { @@ -286,7 +283,7 @@ public interface ActivityInfoProviderService { String id, @ApiParam( name = "devicetype", - value = "The device type name, such as ios, android, windows or fire-alarm.", + value = "The device type name, such as ios, android, windows, or fire-alarm.", required = true) @PathParam("devicetype") @Size(max = 45) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java index 1d6d6a4728..85e48c7317 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceAgentService.java @@ -112,8 +112,8 @@ public interface DeviceAgentService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Create a device instance", - notes = "Create a device Instance", + value = "Creating a Device Instance", + notes = "Create a device instance using this API. Since this is not a physical device you are not able to try out device operations.", tags = "Device Management", extensions = { @Extension(properties = { @@ -157,7 +157,7 @@ public interface DeviceAgentService { "Server error occurred while retrieving the device details.", response = ErrorResponse.class) }) - Response enrollDevice(@ApiParam(name = "device", value = "Device object with data.", required = true) + Response enrollDevice(@ApiParam(name = "device", value = "Define the payload to create a device instance. You can double click on the Example Value and define your values in it to create the instance.", required = true) @Valid Device device); @DELETE @@ -186,7 +186,7 @@ public interface DeviceAgentService { "Server error occurred while dis-enrolling the device.") }) Response disEnrollDevice( - @ApiParam(name = "type", value = "The unique device identifier.") @PathParam("type") String type, + @ApiParam(name = "type", value = "Define the device type, such as android, ios, or windows.") @PathParam("type") String type, @ApiParam(name = "id", value = "The unique device identifier.") @PathParam("id") String id); @PUT @@ -194,8 +194,8 @@ public interface DeviceAgentService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "modify device", - notes = "modify device", + value = "Updating the Device Details", + notes = "You are able to update the details of a device using the API.", tags = "Device Agent Management", extensions = { @Extension(properties = { @@ -239,15 +239,15 @@ public interface DeviceAgentService { "Server error occurred while retrieving the device details.", response = ErrorResponse.class) }) - Response updateDevice(@ApiParam(name = "type", value = "The device type, such as ios, android or windows....etc", required = true) + Response updateDevice(@ApiParam(name = "type", value = "The device type, such as ios, android, or windows.", required = true) @PathParam("type") String type, - @ApiParam(name = "id", value = "The device id.", required = true) + @ApiParam(name = "id", value = "The device ID.", required = true) @PathParam("id") String deviceId, - @ApiParam(name = "device", value = "Device object with data.", required = true) + @ApiParam(name = "device", value = "Update the device details in the device object.", required = true) @Valid Device updateDevice); @POST - @Path("/events/publish/{type}/{deviceId}") + @Path("events/publish{type}/{deviceId}") @ApiOperation( produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, @@ -303,11 +303,11 @@ public interface DeviceAgentService { Map payloadData, @ApiParam( name = "type", - value = "name of the device type") + value = "The name of the device type, such as android, ios, or windows.") @PathParam("type") String type, @ApiParam( name = "deviceId", - value = "deviceId of the device") + value = "The device ID.") @PathParam("deviceId") String deviceId); @POST @@ -380,8 +380,8 @@ public interface DeviceAgentService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Get pending operation of the given device", - notes = "Returns the Operations.", + value = "Getting All the Pending Operations of a Device", + notes = "You can get all the list of pending operations of a device.", tags = "Device Agent Management", extensions = { @Extension(properties = { @@ -426,9 +426,9 @@ public interface DeviceAgentService { "Server error occurred while retrieving information requested device.", response = ErrorResponse.class) }) - Response getPendingOperations(@ApiParam(name = "type", value = "The device type, such as ios, android or windows.", required = true) + Response getPendingOperations(@ApiParam(name = "type", value = "The device type, such as ios, android, or windows.", required = true) @PathParam("type") String type, - @ApiParam(name = "id", value = "The device id.", required = true) + @ApiParam(name = "id", value = "The device ID.", required = true) @PathParam("id") String deviceId); @GET @@ -437,8 +437,8 @@ public interface DeviceAgentService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Get pending operation of the given device", - notes = "Returns the Operation.", + value = "Getting the Next Pending Operations of a Device", + notes = "There can be many operations that are pending on the device end. Get the next pending operation of a specific device using this API.", tags = "Device Agent Management", extensions = { @Extension(properties = { @@ -483,9 +483,9 @@ public interface DeviceAgentService { "Server error occurred while retrieving information requested device.", response = ErrorResponse.class) }) - Response getNextPendingOperation(@ApiParam(name = "type", value = "The device type, such as ios, android or windows.", required = true) + Response getNextPendingOperation(@ApiParam(name = "type", value = "The device type, such as ios, android, or windows.", required = true) @PathParam("type") String type, - @ApiParam(name = "id", value = "The device id.", required = true) + @ApiParam(name = "id", value = "The device ID.", required = true) @PathParam("id") String deviceId); @PUT @@ -494,7 +494,7 @@ public interface DeviceAgentService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Update Operation", + value = "Updating an Operation", notes = "Update the Operations.", tags = "Device Agent Management", extensions = { @@ -539,11 +539,11 @@ public interface DeviceAgentService { "Server error occurred while retrieving information requested device.", response = ErrorResponse.class) }) - Response updateOperation(@ApiParam(name = "type", value = "The device type, such as ios, android or windows.", required = true) + Response updateOperation(@ApiParam(name = "type", value = "The device type, such as ios, android, or windows.", required = true) @PathParam("type") String type, - @ApiParam(name = "id", value = "The device id.", required = true) + @ApiParam(name = "id", value = "The device ID.", required = true) @PathParam("id") String deviceId, - @ApiParam(name = "operation", value = "Operation object with data.", required = true) + @ApiParam(name = "operation", value = "Update the operation object with data.", required = true) @Valid Operation operation); @PUT @@ -552,7 +552,7 @@ public interface DeviceAgentService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Update Properties", + value = "Updating Device Properties", notes = "Update device properties.", tags = "Device Agent Management", extensions = { @@ -597,11 +597,11 @@ public interface DeviceAgentService { "Server error occurred while retrieving information requested device.", response = ErrorResponse.class) }) - Response updateDeviceProperties(@ApiParam(name = "type", value = "The device type, such as ios, android or windows.", required = true) + Response updateDeviceProperties(@ApiParam(name = "type", value = "The device type, such as ios, android, or windows.", required = true) @PathParam("type") String type, - @ApiParam(name = "id", value = "The device id.", required = true) + @ApiParam(name = "id", value = "The device ID.", required = true) @PathParam("id") String deviceId, - @ApiParam(name = "properties", value = "device properties list.", required = true) + @ApiParam(name = "properties", value = "The device properties list.", required = true) @Valid List properties); @GET @@ -610,8 +610,8 @@ public interface DeviceAgentService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Get pending operation of the given device", - notes = "Returns the Operations.", + value = "Getting Specific Operations of a Device", + notes = "Device operations can be in the IN_PROGRESS, PENDING, COMPLETED, ERROR, or REPEATED status. You can use this API to get a list of all the operations that are in a specific status for a given device.", tags = "Device Agent Management", extensions = { @Extension(properties = { @@ -656,9 +656,9 @@ public interface DeviceAgentService { "Server error occurred while retrieving information requested device.", response = ErrorResponse.class) }) - Response getOperationsByDeviceAndStatus(@ApiParam(name = "type", value = "The device type, such as ios, android or windows.", required = true) + Response getOperationsByDeviceAndStatus(@ApiParam(name = "type", value = "The device type, such as ios, android, or windows.", required = true) @PathParam("type") String type, - @ApiParam(name = "id", value = "The device id.", required = true) + @ApiParam(name = "id", value = "The device ID.", required = true) @PathParam("id") String deviceId, @ApiParam(name = "status", value = "status of the operation.", required = true) @QueryParam("status")Operation.Status status); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java index 8b6d7ed030..adfaf07a06 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceEventManagementService.java @@ -77,8 +77,8 @@ public interface DeviceEventManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Add Event Type Defnition", - notes = "Add the event definition for the device.", + value = "Adding the Event Type Definition", + notes = "Add the event definition for a device.", tags = "Device Event Management", extensions = { @Extension(properties = { @@ -120,9 +120,9 @@ public interface DeviceEventManagementService { response = ErrorResponse.class) } ) - Response deployDeviceTypeEventDefinition(@ApiParam(name = "type", value = "name of the device type", required = false) + Response deployDeviceTypeEventDefinition(@ApiParam(name = "type", value = "The device type, such as android, ios, and windows.", required = false) @PathParam("type")String deviceType, - @ApiParam(name = "deviceTypeEvent", value = "DeviceTypeEvent object with data.", required = true) + @ApiParam(name = "deviceTypeEvent", value = "Add the data to complete the DeviceTypeEvent object.", required = true) @Valid DeviceTypeEvent deviceTypeEvent); @DELETE @@ -130,8 +130,8 @@ public interface DeviceEventManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "DELETE", - value = "Delete Event Type Defnition", - notes = "Delete the event definition for the device.", + value = "Delete Event Type Definition", + notes = "Delete the event definition of a device.", tags = "Device Event Management", extensions = { @Extension(properties = { @@ -173,7 +173,7 @@ public interface DeviceEventManagementService { response = ErrorResponse.class) } ) - Response deleteDeviceTypeEventDefinitions(@ApiParam(name = "type", value = "name of the device type", required = false) + Response deleteDeviceTypeEventDefinitions(@ApiParam(name = "type", value = "The device type, such as android, ios, and windows.", required = false) @PathParam("type")String deviceType); @GET @@ -244,7 +244,7 @@ public interface DeviceEventManagementService { produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Getting Last Known Device Events", - notes = "Get the Last Known events for the device.", + notes = "Get the last known events for the device.", tags = "Device Event Management", extensions = { @Extension(properties = { @@ -287,9 +287,9 @@ public interface DeviceEventManagementService { response = ErrorResponse.class) } ) - Response getLastKnownData(@ApiParam(name = "deviceId", value = "id of the device ", required = false) + Response getLastKnownData(@ApiParam(name = "deviceId", value = "The device ID.", required = false) @PathParam("deviceId") String deviceId, - @ApiParam(name = "type", value = "name of the device type", required = false) + @ApiParam(name = "type", value = "The device type, such as android, ios, or windows.", required = false) @PathParam("type") String deviceType); @GET @@ -297,7 +297,7 @@ public interface DeviceEventManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting Event Type Defnition", + value = "Getting Event Type Definition", notes = "Get the event definition for the device.", tags = "Device Event Management", extensions = { @@ -341,7 +341,7 @@ public interface DeviceEventManagementService { response = ErrorResponse.class) } ) - Response getDeviceTypeEventDefinition(@ApiParam(name = "type", value = "name of the device type", required = false) + Response getDeviceTypeEventDefinition(@ApiParam(name = "type", value = "The type of the device, such as android, ios, or windows.", required = false) @PathParam("type")String deviceType) ; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java index 4fbc97f41b..d4b52f2aab 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java @@ -208,13 +208,13 @@ public interface DeviceManagementService { Response getDevices( @ApiParam( name = "name", - value = "The device name, such as shamu, bullhead or angler Nexus device names. ", + value = "The device name. For example, Nexus devices can have names, suhc as shamu, bullhead or angler.", required = false) @Size(max = 45) String name, @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = false) @QueryParam("type") @Size(max = 45) @@ -227,7 +227,7 @@ public interface DeviceManagementService { String user, @ApiParam( name = "userPattern", - value = "The pattern of username of the owner of the device.", + value = "Define a few letters of the username in the order they appear. For example, you want to get the devices that belong to the admin, you can give \\\"ad\\\" or \\\"min\\\" here and you will get the devices that are enrolled under a user who has the given combination as part of the username .", required = false) @QueryParam("userPattern") String userPattern, @@ -303,8 +303,8 @@ public interface DeviceManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting Details of Registered Devices owned by authenticated user", - notes = "Provides details of devices enrolled by authenticated user.", + value = "Getting Details of Registered Devices Owned by an Authenticated User", + notes = "Provides details of devices enrolled by authenticated users.", tags = "Device Management", extensions = { @Extension(properties = { @@ -460,8 +460,8 @@ public interface DeviceManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Get device enrollment status", - notes = "Get device enrollment status", + value = "Getting the Device Enrollment Status", + notes = "Get the device enrollment status and the device details of the device.", tags = "Device Management", extensions = { @Extension(properties = { @@ -564,7 +564,7 @@ public interface DeviceManagementService { Response getDeviceLocation( @ApiParam( name = "type", - value = "The device type name, such as ios, android, windows or fire-alarm.", + value = "The device type name, such as ios, android, windows, or fire-alarm.", required = true) @PathParam("type") @Size(max = 45) @@ -592,7 +592,7 @@ public interface DeviceManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting the information of a Device", + value = "Getting the Information of a Device", notes = "Get the information of a device by specifying the device type and device identifier.", tags = "Device Management", extensions = { @@ -641,7 +641,7 @@ public interface DeviceManagementService { Response getDeviceInformation( @ApiParam( name = "type", - value = "The device type name, such as ios, android, windows or fire-alarm.", + value = "The device type name, such as ios, android, windows, or fire-alarm.", required = true) @PathParam("type") @Size(max = 45) @@ -670,8 +670,8 @@ public interface DeviceManagementService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Update the device specified by device id", - notes = "Returns the status of the updated device operation.", + value = "Update the Displayed Name of the Device", + notes = "Use this API to rename a device so that it is easy for you to identify devices.", tags = "Device Management", extensions = { @Extension(properties = { @@ -719,12 +719,12 @@ public interface DeviceManagementService { Response renameDevice( @ApiParam( name = "device", - value = "The payload containing new name for device with updated name.", + value = "The payload containing the new name of the device.", required = true) Device device, @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("device-type") @Size(max = 45) @@ -745,8 +745,8 @@ public interface DeviceManagementService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "DELETE", - value = "Remove the device specified by device id", - notes = "Returns the status of the deleted device operation.", + value = "Remove the Device Specified by the Device ID", + notes = "Returns the status of the deleted device operation and the details of the deleted device.", tags = "Device Management", extensions = { @Extension(properties = { @@ -794,7 +794,7 @@ public interface DeviceManagementService { Response deleteDevice( @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("device-type") @Size(max = 45) @@ -1041,7 +1041,7 @@ public interface DeviceManagementService { Response getInstalledApplications( @ApiParam( name = "type", - value = "The device type name, such as ios, android, windows or fire-alarm.", + value = "The device type name, such as ios, android, windows, or fire-alarm.", required = true) @PathParam("type") @Size(max = 45) @@ -1190,7 +1190,7 @@ public interface DeviceManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Get the details of the policy that is enforced on a device.", + value = "Getting the Details of a Policy Enforced on a Device", notes = "A policy is enforced on all the devices that register with WSO2 IoTS." + "WSO2 IoTS filters the policies based on the device platform (device type)," + "the device ownership type, the user role or name and finally, the policy that matches these filters will be enforced on the device.", @@ -1252,14 +1252,14 @@ public interface DeviceManagementService { Response getEffectivePolicyOfDevice( @ApiParam( name = "type", - value = "The device type name, such as ios, android, windows or fire-alarm.", + value = "The device type name, such as ios, android, windows, or fire-alarm.", required = true) @PathParam("type") @Size(max = 45) String type, @ApiParam( name = "id", - value = "The device identifier.", + value = "The device ID.", required = true) @PathParam("id") @Size(max = 45) @@ -1327,8 +1327,8 @@ public interface DeviceManagementService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Change device status by device id.", - notes = "Returns the status of the changed device operation.", + value = "Changing the Status of a Device", + notes = "Change the status of a device from one state to another.", tags = "Device Management", extensions = { @Extension(properties = { @@ -1376,21 +1376,21 @@ public interface DeviceManagementService { Response changeDeviceStatus( @ApiParam( name = "type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("type") @Size(max = 45) String type, @ApiParam( name = "id", - value = "Device id", + value = "Device ID.", required = true) @PathParam("id") @Size(max = 45) String id, @ApiParam( name = "newStatus", - value = "New status of the device.", + value = "The available device statuses are CREATED, ACTIVE, INACTIVE, UNREACHABLE, UNCLAIMED, SUSPENDED, BLOCKED, REMOVED, and DISENROLLMENT_REQUESTED.", required = true) @QueryParam("newStatus") EnrolmentInfo.Status newStatus); @@ -1401,8 +1401,8 @@ public interface DeviceManagementService { produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON, httpMethod = "POST", - value = "Add operation to set of devices for a given device type", - notes = "Returns the Activity Related to the operation.", + value = "Sending an Operation to Specific Device Types", + notes = "You can send an operation to a group of devices that belong to a specific device type using this API. For example, you can send a ring operation to all the enrolled Android devices.", tags = "Device Management", extensions = { @Extension(properties = { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java index dee70ef707..5e311d0167 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GeoLocationBasedService.java @@ -92,8 +92,8 @@ public interface GeoLocationBasedService { consumes = "application/json", produces = "application/json", httpMethod = "GET", - value = "Retrieve Analytics for the device type", - notes = "", + value = "Getting the Location Details of a Device", + notes = "Get the location details of a device during a define time period.", response = Response.class, tags = "Geo Service Management", extensions = { @@ -131,24 +131,24 @@ public interface GeoLocationBasedService { Response getGeoDeviceStats( @ApiParam( name = "deviceId", - value = "The registered device Id.", + value = "The device ID.", required = true) @PathParam("deviceId") String deviceId, @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("deviceType") @Size(max = 45) String deviceType, @ApiParam( name = "from", - value = "Get stats from what time", + value = "Define the time to start getting the geo location history of the device in the Epoch or UNIX format.", required = true) @QueryParam("from") long from, @ApiParam( name = "to", - value = "Get stats up to what time", + value = "Define the time to finish getting the geo location history of the device in the Epoch or UNIX format.", required = true) @QueryParam("to") long to); @@ -161,8 +161,8 @@ public interface GeoLocationBasedService { consumes = "application/json", produces = "application/json", httpMethod = "GET", - value = "Retrieve locations of devices", - notes = "", + value = "Getting the Devices in a Defined Geofence", + notes = "Get the details of the devices that are within the defined geofence coordinates. The geofence you are defining is enclosed with four coordinates in the shape of a square or rectangle. This is done by defining two points of the geofence. The other two points are automatically created using the given points. You can define the zoom level or scale of the map too.", response = Response.class, tags = "Geo Service Management", extensions = { @@ -200,28 +200,33 @@ public interface GeoLocationBasedService { Response getGeoDeviceLocations( @ApiParam( name = "minLat", - value = "minimum latitude", - required = true) + value = "Define the minimum latitude of the geofence.", + required = true, + defaultValue ="79.85213577747345") @QueryParam("minLat") double minLat, @ApiParam( name = "maxLat", - value = "maxmimum latitude", - required = true) + value = "Define the maximum latitude of the geofence.", + required = true, + defaultValue ="79.85266149044037") @QueryParam("maxLat") double maxLat, @ApiParam( name = "minLong", - value = "minimum longitude", - required = true) + value = "Define the minimum longitude of the geofence.", + required = true, + defaultValue ="6.909673257977737") @QueryParam("minLong") double minLong, @ApiParam( name = "maxLong", - value = "maximum longitudeude", - required = true) + value = "Define the maximum longitude of the geofence", + required = true, + defaultValue ="6.909673257977737") @QueryParam("maxLong") double maxLong, @ApiParam( name = "zoom", - value = "zoom level", - required = true) + value = "Define the level to zoom or scale the map. You can define any value between 1 to 14.", + required = true, + defaultValue ="2") @QueryParam("zoom") int zoom); @@ -233,9 +238,9 @@ public interface GeoLocationBasedService { @ApiOperation( consumes = "application/json", produces = "application/json", - httpMethod = "GET", - value = "Create Geo alerts for the device", - notes = "", + httpMethod = "POST", + value = "Retrieving a Specific Geo Alert Type from a Device", + notes = "Retrieve a specific geo alert from a device, such as getting a speed alert that was sent to a device.", response = Response.class, tags = "Geo Service Management", extensions = { @@ -274,19 +279,19 @@ public interface GeoLocationBasedService { @Valid Alert alert, @ApiParam( name = "deviceId", - value = "The registered device Id.", + value = "The device ID.", required = true) @PathParam("deviceId") String deviceId, @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("deviceType") @Size(max = 45) String deviceType, @ApiParam( name = "alertType", - value = "The alert type, such as Within, Speed, Stationary", + value = "The alert type, such as Within, Speed,Exit, or Stationary.", required = true) @PathParam("alertType") String alertType); @@ -298,9 +303,9 @@ public interface GeoLocationBasedService { @ApiOperation( consumes = "application/json", produces = "application/json", - httpMethod = "GET", - value = "Update Geo alerts for the device", - notes = "", + httpMethod = "PUT", + value = "Updating the Geo Alerts of a Device", + notes = "Update the a geo alert that was sent to a device.", response = Response.class, tags = "Geo Service Management", extensions = { @@ -339,19 +344,19 @@ public interface GeoLocationBasedService { @Valid Alert alert, @ApiParam( name = "deviceId", - value = "The registered device Id.", + value = "The device ID.", required = true) @PathParam("deviceId") String deviceId, @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("deviceType") @Size(max = 45) String deviceType, @ApiParam( name = "alertType", - value = "The alert type, such as Within, Speed, Stationary", + value = "The alert type, such as Within, Speed, Exit, or Stationary", required = true) @PathParam("alertType") String alertType); @@ -364,8 +369,8 @@ public interface GeoLocationBasedService { consumes = "application/json", produces = "application/json", httpMethod = "GET", - value = "Retrieve Geo alerts for the device", - notes = "", + value = "Getting a Geo Alert from a Device", + notes = "Retrieve a specific geo alert from a device, such as getting a speed alert that was sent to a device.", response = Response.class, tags = "Geo Service Management", extensions = { @@ -403,19 +408,19 @@ public interface GeoLocationBasedService { Response getGeoAlerts( @ApiParam( name = "deviceId", - value = "The registered device Id.", + value = "The device ID.", required = true) @PathParam("deviceId") String deviceId, @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android. or windows.", required = true) @PathParam("deviceType") @Size(max = 45) String deviceType, @ApiParam( name = "alertType", - value = "The alert type, such as Within, Speed, Stationary", + value = "The alert type, such as Within, Speed, Exit, or Stationary", required = true) @PathParam("alertType") String alertType); @@ -428,8 +433,8 @@ public interface GeoLocationBasedService { consumes = "application/json", produces = "application/json", httpMethod = "GET", - value = "Retrieve Geo alerts history for the device", - notes = "", + value = "Getting the Geo Service Alert History of a Device", + notes = "Get the geo alert history of a device during the defined time period.", response = Response.class, tags = "Geo Service Management", extensions = { @@ -467,24 +472,24 @@ public interface GeoLocationBasedService { Response getGeoAlertsHistory( @ApiParam( name = "deviceId", - value = "The registered device Id.", + value = "The device ID.", required = true) @PathParam("deviceId") String deviceId, @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("deviceType") @Size(max = 45) String deviceType, @ApiParam( name = "from", - value = "Get stats from what time", + value = "Define the time to start getting the geo location history of the device in the Epoch or UNIX format.", required = true) @QueryParam("from") long from, @ApiParam( name = "to", - value = "Get stats up to what time", + value = "Define the time to finish getting the geo location history of the device in the Epoch or UNIX format.", required = true) @QueryParam("to") long to); @@ -494,8 +499,8 @@ public interface GeoLocationBasedService { consumes = "application/json", produces = "application/json", httpMethod = "DELETE", - value = "Deletes Geo alerts for the device", - notes = "", + value = "Deleting a Geo Alert from a Device", + notes = "Delete a specific geo alert from a device, such as deleting a speed alert that was sent to the device.", response = Response.class, tags = "Geo Service Management", extensions = { @@ -529,22 +534,22 @@ public interface GeoLocationBasedService { Response removeGeoAlerts( @ApiParam( name = "deviceId", - value = "The registered device Id.", + value = "The device ID.", required = true) @PathParam("deviceId") String deviceId, @ApiParam( name = "deviceType", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("deviceType") String deviceType, @ApiParam( name = "alertType", - value = "The alert type, such as Within, Speed, Stationary", + value = "The alert type, such as Within, Speed, Exit, or Stationary", required = true) @PathParam("alertType") String alertType, @ApiParam( name = "queryName", - value = "The query name.", + value = "When you define a geofence you define a fence name for it. That name needs to be defined here.", required = true) @QueryParam("queryName") String queryName); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java index a815304fb0..4b9f06e75c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/GroupManagementService.java @@ -175,8 +175,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_GET, - value = "Get the list of groups belongs to current user.", - notes = "Returns all permitted groups enrolled with the system.", + value = "Getting the List of Groups", + notes = "Returns all groups enrolled with the system.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -240,8 +240,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_GET, - value = "Get the count of groups belongs to current user.", - notes = "Returns count of all permitted groups enrolled with the system.", + value = "Getting the Number of Device Groups", + notes = "Get the number of device groups in the server that the current signed in user can access.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -284,8 +284,8 @@ public interface GroupManagementService { @ApiOperation( consumes = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_POST, - value = "Add new device group to the system.", - notes = "Add device group with current user as the owner.", + value = "Adding a New Device Group", + notes = "Add device group with the current user as the owner.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -341,7 +341,7 @@ public interface GroupManagementService { }) Response createGroup(@ApiParam( name = "group", - value = "Group object with data.", + value = "Define the group object with data.", required = true) @Valid DeviceGroup group); @@ -350,8 +350,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_GET, - value = "View group specified.", - notes = "Returns details of group enrolled with the system.", + value = "Getting Details of a Specific Device Group", + notes = "Get the details of a specific device group.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -393,7 +393,7 @@ public interface GroupManagementService { }) Response getGroup(@ApiParam( name = "groupId", - value = "ID of the group to view.", + value = "The ID of the group.", required = true) @PathParam("groupId") int groupId); @@ -402,9 +402,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_PUT, - value = "Update a group.", - notes = "If you wish to make changes to an existing group, that can be done by updating the group using " + - "this resource.", + value = "Updating a Device Group", + notes = "If you wish to make changes to an existing group, that can be done by updating the group using this API", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -450,7 +449,7 @@ public interface GroupManagementService { @PathParam("groupId") int groupId, @ApiParam( name = "group", - value = "Group object with data.", + value = "Update the content of the group object.", required = true) @Valid DeviceGroup deviceGroup); @@ -459,9 +458,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_DELETE, - value = "Delete a group.", - notes = "If you wish to remove an existing group, that can be done by updating the group using " + - "this resource.", + value = "Deleting a Group", + notes = "If you wish to remove an existing group, that can be done by updating the group using this API.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -511,9 +509,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_POST, - value = "Manage group sharing with a user.", - notes = "If you wish to share /un share an existing group with a user under defined sharing roles, " + - "that can be done using this resource.", + value = "Sharing a Group", + notes = "A device group can be shared with different user-roles. The users that belong to that role can then view the groups and the devices in it. Use this API to share a group among user roles.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -568,8 +565,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_GET, - value = "View list of roles of a device group.", - notes = "Returns details of roles which particular group has been shared with.", + value = "Getting the List of Roles the Group is Shared With", + notes = "A device group can be shared with different user-roles. The users that belong to that role can then view the groups and the devices in it. Using this API you get the list of roles the device group is shared with.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -620,8 +617,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_GET, - value = "View list of devices in the device group.", - notes = "Returns list of devices in the device group.", + value = "Getting the List of Devices in a Group", + notes = "Returns the list of devices in a device group.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -675,7 +672,7 @@ public interface GroupManagementService { int offset, @ApiParam( name = "limit", - value = "Provide how many device details you require from the starting pagination index/offset.", + value = "Provide how many group details you require from the starting pagination index/offset.", defaultValue = "5") @QueryParam("limit") int limit); @@ -685,8 +682,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_GET, - value = "View list of device count in the device group.", - notes = "Returns device count in the device group.", + value = "Getting the Number of Devices in a Group", + notes = "Get the number of devices in a group using this API.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -737,8 +734,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_POST, - value = "Add devices to group.", - notes = "Add existing devices to the device group.", + value = "Adding Devices to Group", + notes = "Add the enrolled devices to a group.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -793,8 +790,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_DELETE, - value = "Remove devices from group.", - notes = "Remove existing devices from the device group.", + value = "Removing Devices from a Group", + notes = "Remove a device from a group using this API.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -840,7 +837,7 @@ public interface GroupManagementService { @PathParam("groupId") int groupId, @ApiParam( name = "deviceIdentifiers", - value = "Device identifiers of the devices which needed to be removed.", + value = "The device identifiers of the devices that needed to be removed. You can define many device IDs as comma separated values.", required = true) @Valid List deviceIdentifiers); @@ -849,8 +846,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_POST, - value = "Assign devices to groups", - notes = "Add existing device to device groups.", + value = "Adding Devices to a Group", + notes = "Add the existing devices to a device groups.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -892,7 +889,7 @@ public interface GroupManagementService { Response updateDeviceAssigningToGroups( @ApiParam( name = "deviceToGroupsAssignment", - value = "Device to groups assignment", + value = "Define the group ID and the device identifiers of the devices that need to be added to the group in the payload.", required = true) @Valid DeviceToGroupsAssignment deviceToGroupsAssignment); @@ -901,8 +898,8 @@ public interface GroupManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = HTTPConstants.HEADER_GET, - value = "List of groups that have the device", - notes = "List of groups that have the device.", + value = "Getting Device Groups that Include the Specific Device", + notes = " device can be added to one or many groups. This API gives you the list of groups the device has been added to.", tags = "Device Group Management", extensions = { @Extension(properties = { @@ -940,13 +937,13 @@ public interface GroupManagementService { Response getGroups( @ApiParam( name = "deviceId", - value = "Id of the device.", + value = "The device ID.", required = true) @QueryParam("deviceId") String deviceId, @ApiParam( name = "deviceType", - value = "Type of the device.", + value = "The type of the device, such as android, ios, or windows.", required = true) @QueryParam("deviceType") String deviceType); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java index 2f98f96030..71d173c11f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/NotificationManagementService.java @@ -221,9 +221,9 @@ public interface NotificationManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "PUT", - value = "Clear all notifications", + value = "Clearing All Notifications", notes = "When a user needs to mark all the notifications as checked/read this " + - "function can be used to clear all notifications", + "function can be used to clear all notifications.", tags = "Device Notification Management", extensions = { @Extension(properties = { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java index 52c0eaf7f2..9717ce1c27 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RemoteSessionService.java @@ -78,8 +78,8 @@ public interface RemoteSessionService { consumes = "application/json", produces = "application/json", httpMethod = "GET", - value = "Retrieve Connection Information for the device type", - notes = "", + value = "Connecting to a Device", + notes = "You able to connect to a device to start a remote session using this API.", response = Response.class, tags = "Remote Session Service Management", extensions = { @@ -117,12 +117,12 @@ public interface RemoteSessionService { Response getRemoteSessionDeviceConnect( @ApiParam( name = "deviceId", - value = "The registered device Id.", + value = "The device ID.", required = true) @PathParam("deviceId") String deviceId, @ApiParam( name = "device-type", - value = "The device type, such as ios, android or windows.", + value = "The device type, such as ios, android, or windows.", required = true) @PathParam("deviceType") @Size(max = 45) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java index 295fb47555..6d7b3c94fc 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/RoleManagementService.java @@ -185,7 +185,7 @@ public interface RoleManagementService { @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "GET", - value = "Getting the List of Roles filtered by the given prefix", + value = "Getting the List of Roles Filtered by the Given Prefix", notes = "WSO2 IoTS supports role-based access control (RBAC) and role management. Using this API you can the list of roles that are in WSO2 IoTS.\n" + "Note: Internal roles, roles created for service-providers, and application related roles will not be given in the output.", tags = "Role Management", @@ -482,7 +482,7 @@ public interface RoleManagementService { produces = MediaType.APPLICATION_JSON, httpMethod = "POST", value = "Adding a combined Role", - notes = "WSO2 IoTS supports role-based access control (RBAC) and role management. Add a new combined role to WSO2 IoTS using this REST API.", + notes = "You are able to combine two roles that already exist and create one role. For example, you might want a role that has device owner and application management role permissions, you can now select these two roles and create another new role that has all their permissions.", tags = "Role Management", extensions = { @Extension(properties = {