|
|
|
@ -546,6 +546,64 @@ public interface DeviceAgentService {
|
|
|
|
|
@ApiParam(name = "operation", value = "Operation object with data.", required = true)
|
|
|
|
|
@Valid Operation operation);
|
|
|
|
|
|
|
|
|
|
@PUT
|
|
|
|
|
@Path("/properties/{type}/{id}")
|
|
|
|
|
@ApiOperation(
|
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
|
consumes = MediaType.APPLICATION_JSON,
|
|
|
|
|
httpMethod = "PUT",
|
|
|
|
|
value = "Update Properties",
|
|
|
|
|
notes = "Update device properties.",
|
|
|
|
|
tags = "Device Agent Management",
|
|
|
|
|
extensions = {
|
|
|
|
|
@Extension(properties = {
|
|
|
|
|
@ExtensionProperty(name = Constants.SCOPE, value = "perm:device:modify")
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
@ApiResponses(
|
|
|
|
|
value = {
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 200,
|
|
|
|
|
message = "OK. \n Successfully updated the operations.",
|
|
|
|
|
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 = 304,
|
|
|
|
|
message = "Not Modified. 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.",
|
|
|
|
|
response = ErrorResponse.class),
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 404,
|
|
|
|
|
message = "Not Found. \n No device is found under the provided type and id.",
|
|
|
|
|
response = ErrorResponse.class),
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
code = 500,
|
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
|
"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)
|
|
|
|
|
@PathParam("type") String type,
|
|
|
|
|
@ApiParam(name = "id", value = "The device id.", required = true)
|
|
|
|
|
@PathParam("id") String deviceId,
|
|
|
|
|
@ApiParam(name = "properties", value = "device properties list.", required = true)
|
|
|
|
|
@Valid List<Device.Property> properties);
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
|
@Path("/status/operations/{type}/{id}")
|
|
|
|
|
@ApiOperation(
|
|
|
|
|