|
|
@ -45,15 +45,47 @@ public interface DeviceManagementService {
|
|
|
|
tags = "Android Device Management"
|
|
|
|
tags = "Android Device Management"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponse(code = 200, message = "OK. \n " +
|
|
|
|
@ApiResponse(
|
|
|
|
"Application list of the device has successfully been updated"),
|
|
|
|
code = 200,
|
|
|
|
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
|
|
|
message = "OK. \n Application list has been updated successfully",
|
|
|
|
"Sever error occurred while modifying the application list")
|
|
|
|
responseHeaders = {
|
|
|
|
|
|
|
|
@ResponseHeader(
|
|
|
|
|
|
|
|
name = "Content-Location",
|
|
|
|
|
|
|
|
description = "The URL of the updated application list."),
|
|
|
|
|
|
|
|
@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 = 400,
|
|
|
|
|
|
|
|
message = "Bad Request. \n Invalid request or validation error."),
|
|
|
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 404,
|
|
|
|
|
|
|
|
message = "Not Found. \n Resource to be deleted does not exist."),
|
|
|
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 415,
|
|
|
|
|
|
|
|
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
|
|
|
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 500,
|
|
|
|
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
|
|
|
|
"Server error occurred while updating the application list.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
Response updateApplicationList(@ApiParam(name = "id", value = "Device Identifier") @PathParam("id") String id,
|
|
|
|
Response updateApplicationList(
|
|
|
|
@ApiParam(name = "applications", value = "List of applications that need to be " +
|
|
|
|
@ApiParam(
|
|
|
|
"persisted against the device")
|
|
|
|
name = "id",
|
|
|
|
List<Application> applications);
|
|
|
|
value = "Device Identifier")
|
|
|
|
|
|
|
|
@PathParam("id") String id,
|
|
|
|
|
|
|
|
@ApiParam(
|
|
|
|
|
|
|
|
name = "applications",
|
|
|
|
|
|
|
|
value = "List of applications that need to be persisted against the device")
|
|
|
|
|
|
|
|
List<Application> applications);
|
|
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
@GET
|
|
|
|
@Path("/{id}/pending-operations")
|
|
|
|
@Path("/{id}/pending-operations")
|
|
|
@ -67,33 +99,52 @@ public interface DeviceManagementService {
|
|
|
|
response = Operation.class,
|
|
|
|
response = Operation.class,
|
|
|
|
tags = "Android Device Management")
|
|
|
|
tags = "Android Device Management")
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponse(code = 200, message = "OK. \n List of pending operations of the device is returned",
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 200,
|
|
|
|
|
|
|
|
message = "OK. \n Successfully fetched the pending application list of the Android device.",
|
|
|
|
|
|
|
|
response = Operation.class,
|
|
|
|
|
|
|
|
responseContainer = "List",
|
|
|
|
responseHeaders = {
|
|
|
|
responseHeaders = {
|
|
|
|
@ResponseHeader(name = "Content-Type", description = "The content type of the body"),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(name = "ETag", description = "Entity Tag of the response resource.\n" +
|
|
|
|
name = "Content-Type",
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
description = "The content type of the body"),
|
|
|
|
@ResponseHeader(name = "Last-Modified",
|
|
|
|
@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" +
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests.")}),
|
|
|
|
"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.",
|
|
|
|
@ApiResponse(
|
|
|
|
responseHeaders = {
|
|
|
|
code = 304,
|
|
|
|
@ResponseHeader(name = "Location", description = "The Source URL of the document.")}),
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."),
|
|
|
|
@ApiResponse(code = 304, message = "Not Modified. \n " +
|
|
|
|
@ApiResponse(
|
|
|
|
"Empty body because the client already has the latest version of the requested resource."),
|
|
|
|
code = 406,
|
|
|
|
@ApiResponse(code = 400, message = "Bad Request. \n Invalid request or validation error."),
|
|
|
|
message = "Not Acceptable.\n The requested media type is not supported"),
|
|
|
|
@ApiResponse(code = 404, message = "Not Found. \n Requested device not found."),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(code = 406, message = "Not Acceptable. \n The requested media type is not supported."),
|
|
|
|
code = 500,
|
|
|
|
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
|
|
|
message = "Internal Server Error. \n Server error occurred while fetching policies.")
|
|
|
|
"Server error occurred while retrieving the pending operation list of the device.")
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
Response getPendingOperations(
|
|
|
|
Response getPendingOperations(
|
|
|
|
@ApiParam(name = "id", value = "Device Identifier") @PathParam("id") String id,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(name = "resultOperations", value = "Device Operation Status")
|
|
|
|
name = "id",
|
|
|
|
|
|
|
|
value = "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",
|
|
|
|
|
|
|
|
required = false)
|
|
|
|
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince,
|
|
|
|
|
|
|
|
@ApiParam(
|
|
|
|
|
|
|
|
name = "resultOperations",
|
|
|
|
|
|
|
|
value = "Device Operation Status")
|
|
|
|
List<? extends Operation> resultOperations);
|
|
|
|
List<? extends Operation> resultOperations);
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
@POST
|
|
|
|
@ApiOperation(
|
|
|
|
@ApiOperation(
|
|
|
|
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
consumes = MediaType.APPLICATION_JSON,
|
|
|
|
consumes = MediaType.APPLICATION_JSON,
|
|
|
|
httpMethod = "POST",
|
|
|
|
httpMethod = "POST",
|
|
|
|
value = "Register an Android Device",
|
|
|
|
value = "Register an Android Device",
|
|
|
@ -104,13 +155,41 @@ public interface DeviceManagementService {
|
|
|
|
tags = "Android Device Management"
|
|
|
|
tags = "Android Device Management"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponse(code = 201, message = "Created. \n Device has successfully been enrolled. Location header " +
|
|
|
|
@ApiResponse(
|
|
|
|
"contains URL of newly enrolled device",
|
|
|
|
code = 201,
|
|
|
|
|
|
|
|
message = "Created. \n Device enrollment has successfully been created",
|
|
|
|
|
|
|
|
responseHeaders = {
|
|
|
|
|
|
|
|
@ResponseHeader(
|
|
|
|
|
|
|
|
name = "Content-Location",
|
|
|
|
|
|
|
|
description = "URL of the added device enrollment."),
|
|
|
|
|
|
|
|
@ResponseHeader(
|
|
|
|
|
|
|
|
name = "Content-Type",
|
|
|
|
|
|
|
|
description = "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 = {
|
|
|
|
responseHeaders = {
|
|
|
|
@ResponseHeader(name = "Location", description = "URL of the device enrolled")}),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ApiResponse(code = 400, message = "Bad Request. \n Invalid request or validation error."),
|
|
|
|
name = "Content-Location",
|
|
|
|
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
|
|
|
description = "The Source URL of the document.")}),
|
|
|
|
"Server error occurred while enrolling the device.")
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 400,
|
|
|
|
|
|
|
|
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."),
|
|
|
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 500,
|
|
|
|
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
|
|
|
|
"Server error occurred while adding a new policy.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
Response enrollDevice(@ApiParam(name = "device", value = "Device Information to be enroll") Device device);
|
|
|
|
Response enrollDevice(@ApiParam(name = "device", value = "Device Information to be enroll") Device device);
|
|
|
|
|
|
|
|
|
|
|
@ -123,25 +202,42 @@ public interface DeviceManagementService {
|
|
|
|
tags = "Android Device Management"
|
|
|
|
tags = "Android Device Management"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponse(code = 200, message = "Device has already enrolled",
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 200,
|
|
|
|
|
|
|
|
message = "OK. \n Successfully fetched the status of the Android device enrollment.",
|
|
|
|
responseHeaders = {
|
|
|
|
responseHeaders = {
|
|
|
|
@ResponseHeader(name = "Content-Type", description = "The content type of the body"),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(name = "ETag", description = "Entity Tag of the response resource.\n" +
|
|
|
|
name = "Content-Type",
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
description = "The content type of the body"),
|
|
|
|
@ResponseHeader(name = "Last-Modified",
|
|
|
|
@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" +
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests.")}),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
@ApiResponse(code = 404, message = "Not Found. \n Requested device not found."),
|
|
|
|
}),
|
|
|
|
@ApiResponse(code = 303, message = "See Other. \n " +
|
|
|
|
@ApiResponse(
|
|
|
|
"Source can be retrieved from the URL specified at the Location header.",
|
|
|
|
code = 304,
|
|
|
|
responseHeaders = {
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."),
|
|
|
|
@ResponseHeader(name = "Location", description = "The Source URL of the document.")}),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(code = 304, message = "Not Modified. \n " +
|
|
|
|
code = 406,
|
|
|
|
"Empty body because the client already has the latest version of the requested resource."),
|
|
|
|
message = "Not Acceptable.\n The requested media type is not supported"),
|
|
|
|
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
|
|
|
@ApiResponse(
|
|
|
|
"Server error occurred while retrieving the enrollment status of the device."),
|
|
|
|
code = 500,
|
|
|
|
|
|
|
|
message = "Internal Server Error. \n Server error occurred while fetching the enrollment status of the Android device.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
Response isEnrolled(@ApiParam(name = "id", value = "Device Identifier") @PathParam("id") String id);
|
|
|
|
Response isEnrolled(
|
|
|
|
|
|
|
|
@ApiParam(
|
|
|
|
|
|
|
|
name = "id",
|
|
|
|
|
|
|
|
value = "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",
|
|
|
|
|
|
|
|
required = false)
|
|
|
|
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
|
|
|
|
|
|
|
|
|
|
|
@PUT
|
|
|
|
@PUT
|
|
|
|
@Path("/{id}")
|
|
|
|
@Path("/{id}")
|
|
|
@ -151,47 +247,73 @@ public interface DeviceManagementService {
|
|
|
|
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"
|
|
|
|
tags = "Android Device Management"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(
|
|
|
|
@ApiResponse(code = 200, message = "OK. \n Device enrollment has been updated successfully",
|
|
|
|
value = {
|
|
|
|
responseHeaders = {
|
|
|
|
@ApiResponse(
|
|
|
|
@ResponseHeader(name = "Content-Location", description = "The URL of the updated device."),
|
|
|
|
code = 200,
|
|
|
|
@ResponseHeader(name = "Content-Type", description = "The content type of the body"),
|
|
|
|
message = "OK. \n Device enrollment has been updated successfully",
|
|
|
|
@ResponseHeader(name = "ETag", description = "Entity Tag of the response resource.\n" +
|
|
|
|
responseHeaders = {
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(name = "Last-Modified",
|
|
|
|
name = "Content-Location",
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
description = "URL of the updated device enrollment."),
|
|
|
|
"Used by caches, or in conditional requests.")}),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ApiResponse(
|
|
|
|
name = "Content-Type",
|
|
|
|
code = 204,
|
|
|
|
description = "Content type of the body"),
|
|
|
|
message = "No Content. \n Enrollment of the device has not been updated"),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ApiResponse(
|
|
|
|
name = "ETag",
|
|
|
|
code = 400,
|
|
|
|
description = "Entity Tag of the response resource.\n" +
|
|
|
|
message = "Bad Request. \n Invalid request or validation error."),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
@ApiResponse(
|
|
|
|
@ResponseHeader(
|
|
|
|
code = 404,
|
|
|
|
name = "Last-Modified",
|
|
|
|
message = "Not Found. \n Resource to be deleted does not exist."),
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
@ApiResponse(
|
|
|
|
"Used by caches, or in conditional requests.")}),
|
|
|
|
code = 500,
|
|
|
|
@ApiResponse(
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
code = 400,
|
|
|
|
"Server error occurred while modifying the current enrollment of the device.")
|
|
|
|
message = "Bad Request. \n Invalid request or validation error."),
|
|
|
|
})
|
|
|
|
@ApiResponse(
|
|
|
|
Response modifyEnrollment(@ApiParam(name = "id", value = "Device Identifier") @PathParam("id") String id,
|
|
|
|
code = 404,
|
|
|
|
@ApiParam(name = "device", value = "Device information to be modify") Device device);
|
|
|
|
message = "Not Found. \n Resource to be deleted does not exist."),
|
|
|
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 415,
|
|
|
|
|
|
|
|
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
|
|
|
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 500,
|
|
|
|
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
|
|
|
|
"Server error occurred while updating the device enrollment.")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
Response modifyEnrollment(
|
|
|
|
|
|
|
|
@ApiParam(
|
|
|
|
|
|
|
|
name = "id",
|
|
|
|
|
|
|
|
value = "Device Identifier")
|
|
|
|
|
|
|
|
@PathParam("id") String id,
|
|
|
|
|
|
|
|
@ApiParam(
|
|
|
|
|
|
|
|
name = "device",
|
|
|
|
|
|
|
|
value = "Device information to be modify") Device device);
|
|
|
|
|
|
|
|
|
|
|
|
@DELETE
|
|
|
|
@DELETE
|
|
|
|
@Path("/{id}")
|
|
|
|
@Path("/{id}")
|
|
|
|
@ApiOperation(
|
|
|
|
@ApiOperation(
|
|
|
|
httpMethod = "DELETE",
|
|
|
|
httpMethod = "DELETE",
|
|
|
|
value = "Un-registering an Android Device",
|
|
|
|
value = "Un-register an Android Device",
|
|
|
|
notes = "Use this REST API to un-register a specific Android device",
|
|
|
|
notes = "Use this REST API to un-register a specific Android device",
|
|
|
|
tags = "Android Device Management"
|
|
|
|
tags = "Android Device Management"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponse(code = 200, message = "OK. \n Device has successfully been dis-enrolled"),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(code = 404, message = "Not Found. \n Device requested to be dis-enrolled does not exist."),
|
|
|
|
code = 200,
|
|
|
|
@ApiResponse(code = 500, message = "Internal Server Error. \n " +
|
|
|
|
message = "OK. \n Device has successfully been dis-enrolled"),
|
|
|
|
"Server error occurred while dis-enrolling the the device."),
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 404,
|
|
|
|
|
|
|
|
message = "Not Found. \n Resource to be deleted does not exist."),
|
|
|
|
|
|
|
|
@ApiResponse(
|
|
|
|
|
|
|
|
code = 500,
|
|
|
|
|
|
|
|
message = "Internal Server Error. \n " +
|
|
|
|
|
|
|
|
"Server error occurred while dis-enrolling the device.")
|
|
|
|
})
|
|
|
|
})
|
|
|
|
Response disEnrollDevice(@ApiParam(name = "id", value = "Device Identifier") @PathParam("id") String id);
|
|
|
|
Response disEnrollDevice(
|
|
|
|
|
|
|
|
@ApiParam(
|
|
|
|
|
|
|
|
name = "id",
|
|
|
|
|
|
|
|
value = "Device Identifier")
|
|
|
|
|
|
|
|
@PathParam("id") String id);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|