@Api(value="Device Policy Management",description="This API carries all the necessary functionalities "+
@Api(value="Device Policy Management",description="This API includes the functionality around device policy management")
"around device policy management")
@Path("/policies")
@Path("/policies")
@Produces(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@ -52,14 +51,15 @@ public interface PolicyManagementService {
consumes=MediaType.APPLICATION_JSON,
consumes=MediaType.APPLICATION_JSON,
produces=MediaType.APPLICATION_JSON,
produces=MediaType.APPLICATION_JSON,
httpMethod="POST",
httpMethod="POST",
value="Add a new policy.",
value="Adding a Policy",
notes="This particular resource can be used to add a new policy, which will be created in in-active state.",
notes="Add a policy using this REST API command. When adding a policy you will have the option of saving the policy or saving and publishing the policy."+
"Using this REST API you are able to save a created Policy and this policy will be in the inactive state.",
tags="Device Policy Management")
tags="Device Policy Management")
@ApiResponses(
@ApiResponses(
value={
value={
@ApiResponse(
@ApiResponse(
code=201,
code=201,
message="Created. \n Policy has successfully been created",
message="Created. \n Successfully created the policy.",
responseHeaders={
responseHeaders={
@ResponseHeader(
@ResponseHeader(
name="Content-Location",
name="Content-Location",
@ -73,13 +73,13 @@ public interface PolicyManagementService {
"Used by caches, or in conditional requests."),
"Used by caches, or in conditional requests."),
@ResponseHeader(
@ResponseHeader(
name="Last-Modified",
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.")
"Used by caches, or in conditional requests.")
}
}
),
),
@ApiResponse(
@ApiResponse(
code=303,
code=303,
message="See Other. \n Source can be retrieved from the URL specified at the Location header.",
message="See Other. \n he source can be retrieved from the URL specified in the location header",
responseHeaders={
responseHeaders={
@ResponseHeader(
@ResponseHeader(
name="Content-Location",
name="Content-Location",
@ -90,11 +90,11 @@ public interface PolicyManagementService {
response=ErrorResponse.class),
response=ErrorResponse.class),
@ApiResponse(
@ApiResponse(
code=401,
code=401,
message="Not Found. \n Current logged in user is not authorized to add policies.",
message="Not Found. \n The user that is currently logged in is not authorized to add policies.",
response=ErrorResponse.class),
response=ErrorResponse.class),
@ApiResponse(
@ApiResponse(
code=415,
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(
@ApiResponse(
code=500,
code=500,
message="Internal Server Error. \n "+
message="Internal Server Error. \n "+
@ -105,17 +105,18 @@ public interface PolicyManagementService {
ResponseaddPolicy(
ResponseaddPolicy(
@ApiParam(
@ApiParam(
name="policy",
name="policy",
value="Policy details related to the operation.",
value="The properties required to add a new policy.",
@ApiParam(name="username",value="Username of the user.",required=true)
@ApiParam(
name="username",
value="The username of the user.",
required=true,
defaultValue="admin")
@PathParam("username")Stringusername,
@PathParam("username")Stringusername,
@ApiParam(
@ApiParam(
name="domain",
name="domain",
value="Domain name of the user store.",
value="The domain name of the user store.",
required=false)
required=false)
@QueryParam("domain")Stringdomain);
@QueryParam("domain")Stringdomain);
@ -305,14 +317,14 @@ public interface UserManagementService {
@ApiOperation(
@ApiOperation(
produces=MediaType.APPLICATION_JSON,
produces=MediaType.APPLICATION_JSON,
httpMethod="GET",
httpMethod="GET",
value="Get user list",
value="Getting Details of Users",
notes="If you wish to get the details of all the users registered with EMM, you can do so "
notes="You are able to manage users in WSO2 EMM by adding, updating and removing users. If you wish to get the list of users registered with WSO2 EMM, you can do so "
+"using this REST API",
+"using this REST API",
tags="User Management")
tags="User Management")
@ApiResponses(value={
@ApiResponses(value={
@ApiResponse(
@ApiResponse(
code=200,
code=200,
message="OK. \n Successfully fetched the requested users.",
message="OK. \n Successfully fetched the list of users registered with WSO2 EMM.",
response=BasicUserInfoList.class,
response=BasicUserInfoList.class,
responseHeaders={
responseHeaders={
@ResponseHeader(
@ResponseHeader(
@ -324,42 +336,46 @@ public interface UserManagementService {
"Used by caches, or in conditional requests."),
"Used by caches, or in conditional requests."),
@ResponseHeader(
@ResponseHeader(
name="Last-Modified",
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."),
"Used by caches, or in conditional requests."),
}),
}),
@ApiResponse(
@ApiResponse(
code=304,
code=304,
message="Not Modified. \n Empty body because the client already has 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.\n"),
@ApiResponse(
@ApiResponse(
code=406,
code=406,
message="Not Acceptable.\n The requested media type is not supported",
message="Not Acceptable.\n The requested media type is not supported",
response=ErrorResponse.class),
response=ErrorResponse.class),
@ApiResponse(
@ApiResponse(
code=500,
code=500,
message="Internal Server Error. \n Server error occurred while fetching the user list.",
message="Internal Server Error. \n Server error occurred while fetching the list of WSO2 EMM users.",
@ -503,29 +522,30 @@ public interface UserManagementService {
consumes=MediaType.APPLICATION_JSON,
consumes=MediaType.APPLICATION_JSON,
produces=MediaType.APPLICATION_JSON,
produces=MediaType.APPLICATION_JSON,
httpMethod="POST",
httpMethod="POST",
value="Send invitation mail.",
value="Sending Enrollment Invitations to Users",
notes="A user is able to send invitation mail via this REST API.",
notes="Send the users a mail inviting them to download the EMM mobile application on their devices using the REST API given below.\n"+
"Before running the REST API command to send the enrollment invitations to users make sure to configure WSO2 EMM as explained in step 4, under the WSO2 EMM general server configurations documentation.",
tags="User Management")
tags="User Management")
@ApiResponses(value={
@ApiResponses(value={
@ApiResponse(
@ApiResponse(
code=200,
code=200,
message="OK. \n Invitation mails have been sent."),
message="OK. \n Successfully sent the invitation mail."),
@ApiResponse(
@ApiResponse(
code=400,
code=400,
message="Bad Request. \n Invalid request or validation error.",
message="Bad Request. \n Invalid request or validation error.",
response=ErrorResponse.class),
response=ErrorResponse.class),
@ApiResponse(
@ApiResponse(
code=404,
code=404,
message="Not Found. \n Resource to be deleted does not exist.",
message="Not Found. \n The specified resource does not exist.\n",
response=ErrorResponse.class),
response=ErrorResponse.class),
@ApiResponse(
@ApiResponse(
code=415,
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",
response=ErrorResponse.class),
response=ErrorResponse.class),
@ApiResponse(
@ApiResponse(
code=500,
code=500,
message="Internal Server Error. \n "+
message="Internal Server Error. \n "+
"Server error occurred while updating credentials of the user.",
"Server error occurred while updating the user credentials.",
@ -51,8 +51,9 @@ public interface GroupManagementAdminService {
@ApiOperation(
@ApiOperation(
produces=MediaType.APPLICATION_JSON,
produces=MediaType.APPLICATION_JSON,
httpMethod="GET",
httpMethod="GET",
value="Get groups by the name.",
value="Grouping Devices",
notes="Get devices the name of device and tenant.",
notes="Many devices can be registered with WSO2 IoTS. In order to manage them in an efficient manner, "+
"you can group devices and view the data gathered by the devices or share the groups with users so that they can monitor the devices in the respective group.",
response=DeviceGroupWrapper.class,
response=DeviceGroupWrapper.class,
responseContainer="List",
responseContainer="List",
tags="Group Management Administrative Service")
tags="Group Management Administrative Service")
@ -70,25 +71,24 @@ public interface GroupManagementAdminService {
"Used by caches, or in conditional requests."),
"Used by caches, or in conditional requests."),
@ResponseHeader(
@ResponseHeader(
name="Last-Modified",
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."),
"Used by caches, or in conditional requests."),
}),
}),
@ApiResponse(
@ApiResponse(
code=304,
code=304,
message="Not Modified. \n Empty body because the client has already the latest version of the "+
message="Not Modified. \n Empty body because the client already has the latest version of the requested resource."),
"requested resource."),
@ApiResponse(
@ApiResponse(
code=406,
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(
@ApiResponse(
code=500,
code=500,
message="Internal Server ErrorResponse. \n Server error occurred while fetching the group list.")
message="Internal Server ErrorResponse. \n Server error occurred while fetching the list of device groups.")
})
})
@Permission(name="View All Groups",permission="/permission/admin/device-mgt/user/groups/list")
@Permission(name="View All Groups",permission="/permission/admin/device-mgt/user/groups/list")
ResponsegetGroupsOfUser(
ResponsegetGroupsOfUser(
@ApiParam(
@ApiParam(
name="username",
name="username",
value="Username of the user.",
value="The sername of the user.",
required=true)
required=true)
@QueryParam("username")Stringusername,
@QueryParam("username")Stringusername,
@ApiParam(
@ApiParam(
@ -99,11 +99,13 @@ public interface GroupManagementAdminService {
@ApiParam(
@ApiParam(
name="offset",
name="offset",
value="Starting point within the complete list of items qualified.",
value="Starting point within the complete list of items qualified.",
required=false)
required=false,
defaultValue="0")
@QueryParam("offset")intoffset,
@QueryParam("offset")intoffset,
@ApiParam(
@ApiParam(
name="limit",
name="limit",
value="Maximum size of resource array to return.",
value="Maximum size of resource array to return.",