Added swagger annotations and refined the messages

merge-requests/1/head
Shavindri 8 years ago
parent ea4d7bc823
commit f6c0aeecfc

@ -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;

@ -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<AndroidApplication> 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<? extends Operation> 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);
}

@ -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;

@ -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);

@ -51,7 +51,7 @@
<property name="version" value="1.0"/>
<property name="host" value="localhost:9443"/>
<property name="schemes" value="https" />
<property name="basePath" value="/api-device-mgt-android-v1.0"/>
<property name="basePath" value="/api/device-mgt/android/v1.0"/>
<property name="title" value="Android Device Management API Definitions"/>
<property name="contact" value="dev@wso2.org"/>
<property name="license" value="Apache 2.0"/>

@ -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;

Loading…
Cancel
Save