|
|
|
@ -129,6 +129,75 @@ public interface DeviceManagementService {
|
|
|
|
|
required = false)
|
|
|
|
|
@QueryParam("limit") int limit);
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
|
@Path("{type}/{id}/info")
|
|
|
|
|
@ApiOperation(
|
|
|
|
|
consumes = MediaType.APPLICATION_JSON,
|
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
|
httpMethod = "GET",
|
|
|
|
|
value = "Retrieve devices information from the supplied device identifier.",
|
|
|
|
|
notes = "This will return device information such as CPU usage, memory usage etc for supplied device " +
|
|
|
|
|
"identifier.",
|
|
|
|
|
response = DeviceInfo.class,
|
|
|
|
|
tags = "Device Management")
|
|
|
|
|
@ApiResponses(
|
|
|
|
|
value = {
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 200,
|
|
|
|
|
message = "OK. \n Information of the submitted list of devices is returned",
|
|
|
|
|
response = DeviceInfo.class,
|
|
|
|
|
responseHeaders = {
|
|
|
|
|
@ResponseHeader(
|
|
|
|
|
name = "Content-Type",
|
|
|
|
|
description = "The content type of the body"),
|
|
|
|
|
@ResponseHeader(
|
|
|
|
|
name = "ETag",
|
|
|
|
|
description = "Entity Tag of the response resource.\n" +
|
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
|
@ResponseHeader(
|
|
|
|
|
name = "Last-Modified",
|
|
|
|
|
description = "Date and time the resource has been 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.",
|
|
|
|
|
responseHeaders = {
|
|
|
|
|
@ResponseHeader(
|
|
|
|
|
name = "Content-Location",
|
|
|
|
|
description = "The Source URL of the document.")}),
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 304,
|
|
|
|
|
message = "Not Modified. \n " +
|
|
|
|
|
"Empty body because the client already has the latest version of the requested resource."),
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 400,
|
|
|
|
|
message = "Bad Request. \n Invalid request or validation error."),
|
|
|
|
|
@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 retrieving information of the list of the devices submitted.")
|
|
|
|
|
})
|
|
|
|
|
@Permission(scope = "device-info", permissions = {"/permission/admin/device-mgt/admin/devices/list"})
|
|
|
|
|
Response getDeviceInfo(
|
|
|
|
|
@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 identifier of the device.",
|
|
|
|
|
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",
|
|
|
|
|
required = false)
|
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
@ApiOperation(
|
|
|
|
|
consumes = MediaType.APPLICATION_JSON,
|
|
|
|
@ -300,6 +369,49 @@ public interface DeviceManagementService {
|
|
|
|
|
required = false)
|
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
|
@Path("/locations")
|
|
|
|
|
@ApiOperation(
|
|
|
|
|
consumes = MediaType.APPLICATION_JSON,
|
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
|
httpMethod = "POST",
|
|
|
|
|
value = "Get the device location of a given devices and a device type.",
|
|
|
|
|
notes = "This will return the device locations including latitude and longitude as well the "
|
|
|
|
|
+ "physical address of the given devices.",
|
|
|
|
|
response = DeviceLocation.class,
|
|
|
|
|
responseContainer = "List",
|
|
|
|
|
tags = "Device Management")
|
|
|
|
|
@ApiResponses(
|
|
|
|
|
value = {
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 200,
|
|
|
|
|
message = "Successfully fetched the device location.",
|
|
|
|
|
response = DeviceLocation.class,
|
|
|
|
|
responseContainer = "List"),
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 304,
|
|
|
|
|
message = "Not Modified. \n " +
|
|
|
|
|
"Empty body because the client already has the latest version of the requested resource."),
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 404,
|
|
|
|
|
message = "Location details are not available for the given devices."),
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 500,
|
|
|
|
|
message = "Error occurred while getting the device location.")
|
|
|
|
|
})
|
|
|
|
|
@Permission(scope = "device-info", permissions = {"/permission/admin/device-mgt/admin/devices/list"})
|
|
|
|
|
Response getDeviceLocations(
|
|
|
|
|
@ApiParam(
|
|
|
|
|
name = "deviceIds",
|
|
|
|
|
value = "List of device identifiers",
|
|
|
|
|
required = true) List<DeviceIdentifier> deviceIds,
|
|
|
|
|
@ApiParam(
|
|
|
|
|
name = "If-Modified-Since",
|
|
|
|
|
value = "Validates if the requested variant has not been modified since the time specified",
|
|
|
|
|
required = false)
|
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/{type}/{id}/features")
|
|
|
|
|
@ApiOperation(
|
|
|
|
|