mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
updating API context and publish names
This commit is contained in:
parent
d7b94a7f07
commit
32d603c8f6
@ -59,11 +59,11 @@ import javax.ws.rs.core.Response;
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows Configuration Management",
|
@Api(value = "Windows Configuration Management",
|
||||||
description = "This carries all the resources related to Windows configurations management functionalities")
|
description = "This carries all the resources related to Windows configurations management functionality")
|
||||||
@WebService
|
@WebService
|
||||||
@Path("/configuration")
|
@Path("/configuration")
|
||||||
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||||
|
|||||||
@ -52,7 +52,7 @@ import java.util.List;
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows Device Management Administrative Service",
|
@Api(value = "Windows Device Management Administrative Service",
|
||||||
@ -63,277 +63,407 @@ import java.util.List;
|
|||||||
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||||
public interface DeviceManagementAdminService {
|
public interface DeviceManagementAdminService {
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/lock-devices")
|
@Path("/lock-devices")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "POST",
|
httpMethod = "POST",
|
||||||
value = "Adding a Device Lock on Windows devices.",
|
value = "Adding a Device Lock on Windows devices.",
|
||||||
notes = "Using this API you have the option of Device Windows device.",
|
notes = "Using this API you have the option of Device Windows device.",
|
||||||
response = Activity.class,
|
response = Activity.class,
|
||||||
tags = "Windows Device Management Administrative Service",
|
tags = "Windows Device Management Administrative Service",
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(
|
@Authorization(
|
||||||
value = "permission",
|
value = "permission",
|
||||||
scopes = {@AuthorizationScope(
|
scopes = {@AuthorizationScope(
|
||||||
scope = "/device-mgt/devices/owning-device/operations/windows/lock",
|
scope = "/device-mgt/devices/owning-device/operations/windows/lock",
|
||||||
description = "Lock Device")}
|
description = "Lock Device")}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 201,
|
code = 201,
|
||||||
message = "Created. \n Successfully scheduled the device lock operation.",
|
message = "Created. \n Successfully scheduled the device lock operation.",
|
||||||
response = Activity.class,
|
response = Activity.class,
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Location",
|
name = "Content-Location",
|
||||||
description = "URL of the activity instance that refers to the scheduled operation."),
|
description = "URL of the activity instance that refers to the scheduled operation."),
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Type",
|
name = "Content-Type",
|
||||||
description = "Content type of the body"),
|
description = "Content type of the body"),
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "ETag",
|
name = "ETag",
|
||||||
description = "Entity Tag of the response resource.\n" +
|
description = "Entity Tag of the response resource.\n" +
|
||||||
"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 was last modified. \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 The source can be retrieved from the URL specified in the location header.",
|
message = "See Other. \n The source can be retrieved from the URL specified in the location header.",
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
name = "Content-Location",
|
name = "Content-Location",
|
||||||
description = "The Source URL of the document.")}),
|
description = "The Source URL of the document.")}),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 400,
|
code = 400,
|
||||||
message = "Bad Request. \n Invalid request or validation error."),
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The format of the requested entity was not supported.\n"),
|
message = "Unsupported media type. \n The format of the requested entity was not supported.\n"),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while locking the device.")
|
"Server error occurred while locking the device.")
|
||||||
})
|
})
|
||||||
Response lock(@HeaderParam("Accept") String headerParam, @ApiParam(
|
Response lock(@HeaderParam("Accept") String headerParam, @ApiParam(
|
||||||
name = "deviceIDs",
|
name = "deviceIDs",
|
||||||
value = "Provide the ID of the AWindows device. Multiple device IDs can be added by " +
|
value = "Provide the ID of the AWindows device. Multiple device IDs can be added by " +
|
||||||
"using comma separated values. ",
|
"using comma separated values. ",
|
||||||
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/disenroll-devices")
|
||||||
|
@ApiOperation(
|
||||||
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
|
httpMethod = "POST",
|
||||||
|
value = "Dis-enrol the windows Devices",
|
||||||
|
notes = "Dis-enroll on Android devices",
|
||||||
|
response = Activity.class,
|
||||||
|
tags = "Windows Device Management Administrative Service.",
|
||||||
|
authorizations = {
|
||||||
|
@Authorization(
|
||||||
|
value = "permission",
|
||||||
|
scopes = {@AuthorizationScope(
|
||||||
|
scope = "/device-mgt/devices/disenroll/windows",
|
||||||
|
description = "Dis-enroll the windows devices ")}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(
|
||||||
|
code = 201,
|
||||||
|
message = "Created. \n Successfully scheduled the Dis-enroll operation.",
|
||||||
|
response = Activity.class,
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "URL of the activity instance that refers to the scheduled operation."),
|
||||||
|
@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 was last modified the last time.\n" +
|
||||||
|
"Used by caches, or in conditional requests.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 303,
|
||||||
|
message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n",
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "The Source URL of the document.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 400,
|
||||||
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 415,
|
||||||
|
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 adding a Dis-enroll operation.")
|
||||||
|
})
|
||||||
|
Response disenroll(@HeaderParam("Accept") String headerParam, @ApiParam(
|
||||||
|
name = "deviceIDs",
|
||||||
|
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
||||||
|
"using comma separated values. ",
|
||||||
|
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/wipe-devices")
|
||||||
|
@ApiOperation(
|
||||||
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
|
produces = MediaType.APPLICATION_JSON,
|
||||||
|
httpMethod = "POST",
|
||||||
|
value = "Factory Resetting an Windows Device",
|
||||||
|
notes = "Factory rest or erase all the data stored on the Windows devices" +
|
||||||
|
"to restore them back to the original system.",
|
||||||
|
response = Activity.class,
|
||||||
|
tags = "Windows Device Management Administrative Service",
|
||||||
|
authorizations = {
|
||||||
|
@Authorization(
|
||||||
|
value = "permission",
|
||||||
|
scopes = {@AuthorizationScope(
|
||||||
|
scope = "/device-mgt/devices/owning-device/operations/windows/wipe",
|
||||||
|
description = "DeviceWipe")}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(
|
||||||
|
code = 201,
|
||||||
|
message = "Created. \n Successfully scheduled the Data wipe operation.",
|
||||||
|
response = Activity.class,
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "URL of the activity instance that refers to the scheduled operation."),
|
||||||
|
@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 was last modified." +
|
||||||
|
"Used by caches, or in conditional requests.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 303,
|
||||||
|
message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n",
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "The Source URL of the document.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 400,
|
||||||
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 415,
|
||||||
|
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 adding the Data wipe operation.")})
|
||||||
|
Response wipe(@HeaderParam("Accept") String headerParam, @ApiParam(
|
||||||
|
name = "deviceIDs",
|
||||||
|
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
||||||
|
"using comma separated values. ",
|
||||||
|
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/ring-devices")
|
||||||
|
@ApiOperation(
|
||||||
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
|
httpMethod = "POST",
|
||||||
|
value = "Ringing Windows Devices",
|
||||||
|
notes = "Ring Windows devices.",
|
||||||
|
response = Activity.class,
|
||||||
|
tags = "Windows Device Management Administrative Service",
|
||||||
|
authorizations = {
|
||||||
|
@Authorization(
|
||||||
|
value = "permission",
|
||||||
|
scopes = {@AuthorizationScope(
|
||||||
|
scope = "/device-mgt/devices/owning-device/operations/windows/ring",
|
||||||
|
description = "Ring Device")}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(
|
||||||
|
code = 201,
|
||||||
|
message = "Created. \n Successfully scheduled the device ring operation.",
|
||||||
|
response = Activity.class,
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "URL of the activity instance that refers to the scheduled operation."),
|
||||||
|
@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 was last modified.\n" +
|
||||||
|
"Used by caches, or in conditional requests.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 303,
|
||||||
|
message = "See Other. \n The source can be retrieved from the URL specified in the location header.",
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "The Source URL of the document.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 400,
|
||||||
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 415,
|
||||||
|
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 ring operation.")
|
||||||
|
})
|
||||||
|
Response ring(@HeaderParam("Accept") String headerParam, @ApiParam(
|
||||||
|
name = "deviceIDs",
|
||||||
|
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
||||||
|
"using comma separated values. ",
|
||||||
|
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/lock-reset-devices")
|
||||||
|
@ApiOperation(
|
||||||
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
|
httpMethod = "POST",
|
||||||
|
value = "Lock reset on Windows devices",
|
||||||
|
notes = "Lock reset on Windows devices.Its use to reset the device pass code",
|
||||||
|
response = Activity.class,
|
||||||
|
tags = "Windows Device Management Administrative Service",
|
||||||
|
authorizations = {
|
||||||
|
@Authorization(
|
||||||
|
value = "permission",
|
||||||
|
scopes = {@AuthorizationScope(
|
||||||
|
scope = "/device-mgt/devices/owning-device/operations/windows/lock-reset",
|
||||||
|
description = "Lock reset")}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(
|
||||||
|
code = 201,
|
||||||
|
message = "Created. \n Successfully scheduled the lock-reset operation.",
|
||||||
|
response = Activity.class,
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "URL of the activity instance that refers to the scheduled operation."),
|
||||||
|
@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 was last modified.\n" +
|
||||||
|
"Used by caches, or in conditional requests.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 303,
|
||||||
|
message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n",
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "The Source URL of the document.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 400,
|
||||||
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 415,
|
||||||
|
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 adding adding a lock-reset operation.")
|
||||||
|
})
|
||||||
|
Response lockReset(@HeaderParam("Accept") String acceptHeader, @ApiParam(
|
||||||
|
name = "deviceIDs",
|
||||||
|
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
||||||
|
"using comma separated values. ",
|
||||||
|
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/location")
|
||||||
|
@ApiOperation(
|
||||||
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
|
httpMethod = "POST",
|
||||||
|
value = "Requesting Location Coordinates",
|
||||||
|
responseContainer = "List",
|
||||||
|
notes = "Request location coordinates of Windows devices. \n" +
|
||||||
|
"Example: In situations where you have lost your device and need to find out where it is, " +
|
||||||
|
"you can use this REST API to get the location of the device.",
|
||||||
|
response = Activity.class,
|
||||||
|
tags = "Windows Device Management Administrative Service",
|
||||||
|
authorizations = {
|
||||||
|
@Authorization(
|
||||||
|
value = "permission",
|
||||||
|
scopes = {@AuthorizationScope(
|
||||||
|
scope = "/device-mgt/devices/owning-device/operations/windows/location",
|
||||||
|
description = "Get Device Location")}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(
|
||||||
|
code = 201,
|
||||||
|
message = "Created. \n Get-location operation has successfully been scheduled",
|
||||||
|
response = Activity.class,
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "URL of the activity instance that refers to the " +
|
||||||
|
"scheduled operation."),
|
||||||
|
@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 was last modified.\n" +
|
||||||
|
"Used by caches, or in conditional requests.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 303,
|
||||||
|
message = "See Other. \n The source can be retrieved from the URL specified in the" +
|
||||||
|
" location header.",
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "The Source URL of the document.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 400,
|
||||||
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 415,
|
||||||
|
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 adding a new get-location operation.")})
|
||||||
|
Response getDeviceLocation(
|
||||||
|
@ApiParam(
|
||||||
|
name = "deviceIDs",
|
||||||
|
value = "Provide the ID of the Windows device. Multiple device IDs can be added by " +
|
||||||
|
"using comma separated values. ",
|
||||||
|
required = true)
|
||||||
|
List<String> deviceIDs);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/disenroll-devices")
|
@Path("/reboot")
|
||||||
@ApiOperation(
|
@ApiOperation(
|
||||||
consumes = MediaType.APPLICATION_JSON,
|
consumes = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "POST",
|
httpMethod = "POST",
|
||||||
value = "Dis-enrol the windows Devices",
|
value = "Rebooting Windows Devices",
|
||||||
notes = "Dis-enroll on Android devices",
|
notes = "Reboot or restart your Windows devices.",
|
||||||
response = Activity.class,
|
|
||||||
tags = "Windows Device Management Administrative Service.",
|
|
||||||
authorizations = {
|
|
||||||
@Authorization(
|
|
||||||
value = "permission",
|
|
||||||
scopes = {@AuthorizationScope(
|
|
||||||
scope = "/device-mgt/devices/disenroll/windows",
|
|
||||||
description = "Dis-enroll the windows devices ")}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(
|
|
||||||
code = 201,
|
|
||||||
message = "Created. \n Successfully scheduled the Dis-enroll operation.",
|
|
||||||
response = Activity.class,
|
|
||||||
responseHeaders = {
|
|
||||||
@ResponseHeader(
|
|
||||||
name = "Content-Location",
|
|
||||||
description = "URL of the activity instance that refers to the scheduled operation."),
|
|
||||||
@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 was last modified the last time.\n" +
|
|
||||||
"Used by caches, or in conditional requests.")}),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 303,
|
|
||||||
message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n",
|
|
||||||
responseHeaders = {
|
|
||||||
@ResponseHeader(
|
|
||||||
name = "Content-Location",
|
|
||||||
description = "The Source URL of the document.")}),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 400,
|
|
||||||
message = "Bad Request. \n Invalid request or validation error."),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 415,
|
|
||||||
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 adding a Dis-enroll operation.")
|
|
||||||
})
|
|
||||||
Response disenroll(@HeaderParam("Accept") String headerParam, @ApiParam(
|
|
||||||
name = "deviceIDs",
|
|
||||||
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
|
||||||
"using comma separated values. ",
|
|
||||||
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path("/wipe-devices")
|
|
||||||
@ApiOperation(
|
|
||||||
consumes = MediaType.APPLICATION_JSON,
|
|
||||||
produces = MediaType.APPLICATION_JSON,
|
|
||||||
httpMethod = "POST",
|
|
||||||
value = "Factory Resetting an Windows Device",
|
|
||||||
notes = "Factory rest or erase all the data stored on the Windows devices" +
|
|
||||||
"to restore them back to the original system.",
|
|
||||||
response = Activity.class,
|
|
||||||
tags = "Windows Device Management Administrative Service",
|
|
||||||
authorizations = {
|
|
||||||
@Authorization(
|
|
||||||
value = "permission",
|
|
||||||
scopes = {@AuthorizationScope(
|
|
||||||
scope = "/device-mgt/devices/owning-device/operations/windows/wipe",
|
|
||||||
description = "DeviceWipe")}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(
|
|
||||||
code = 201,
|
|
||||||
message = "Created. \n Successfully scheduled the Data wipe operation.",
|
|
||||||
response = Activity.class,
|
|
||||||
responseHeaders = {
|
|
||||||
@ResponseHeader(
|
|
||||||
name = "Content-Location",
|
|
||||||
description = "URL of the activity instance that refers to the scheduled operation."),
|
|
||||||
@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 was last modified." +
|
|
||||||
"Used by caches, or in conditional requests.")}),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 303,
|
|
||||||
message = "See Other. \n The source can be retrieved from the URL specified in the location header.\n",
|
|
||||||
responseHeaders = {
|
|
||||||
@ResponseHeader(
|
|
||||||
name = "Content-Location",
|
|
||||||
description = "The Source URL of the document.")}),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 400,
|
|
||||||
message = "Bad Request. \n Invalid request or validation error."),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 415,
|
|
||||||
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 adding the Data wipe operation.")})
|
|
||||||
Response wipe(@HeaderParam("Accept") String headerParam, @ApiParam(
|
|
||||||
name = "deviceIDs",
|
|
||||||
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
|
||||||
"using comma separated values. ",
|
|
||||||
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path("/ring-devices")
|
|
||||||
@ApiOperation(
|
|
||||||
consumes = MediaType.APPLICATION_JSON,
|
|
||||||
httpMethod = "POST",
|
|
||||||
value = "Ringing Windows Devices",
|
|
||||||
notes = "Ring Windows devices.",
|
|
||||||
response = Activity.class,
|
response = Activity.class,
|
||||||
tags = "Windows Device Management Administrative Service",
|
tags = "Windows Device Management Administrative Service",
|
||||||
authorizations = {
|
authorizations = {
|
||||||
@Authorization(
|
@Authorization(
|
||||||
value="permission",
|
value="permission",
|
||||||
scopes = { @AuthorizationScope(
|
scopes = { @AuthorizationScope(
|
||||||
scope = "/device-mgt/devices/owning-device/operations/windows/ring",
|
scope = "/device-mgt/devices/owning-device/operations/windows/reboot",
|
||||||
description = "Ring Device") }
|
description = "Reboot Device") }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 201,
|
code = 201,
|
||||||
message = "Created. \n Successfully scheduled the device ring operation.",
|
message = "Created. \n Successfully scheduled the device reboot operation.",
|
||||||
response = Activity.class,
|
|
||||||
responseHeaders = {
|
|
||||||
@ResponseHeader(
|
|
||||||
name = "Content-Location",
|
|
||||||
description = "URL of the activity instance that refers to the scheduled operation."),
|
|
||||||
@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 was last modified.\n" +
|
|
||||||
"Used by caches, or in conditional requests.")}),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 303,
|
|
||||||
message = "See Other. \n The source can be retrieved from the URL specified in the location header.",
|
|
||||||
responseHeaders = {
|
|
||||||
@ResponseHeader(
|
|
||||||
name = "Content-Location",
|
|
||||||
description = "The Source URL of the document.")}),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 400,
|
|
||||||
message = "Bad Request. \n Invalid request or validation error."),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 415,
|
|
||||||
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 ring operation.")
|
|
||||||
})
|
|
||||||
Response ring(@HeaderParam("Accept") String headerParam, @ApiParam(
|
|
||||||
name = "deviceIDs",
|
|
||||||
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
|
||||||
"using comma separated values. ",
|
|
||||||
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path("/lock-reset-devices")
|
|
||||||
@ApiOperation(
|
|
||||||
consumes = MediaType.APPLICATION_JSON,
|
|
||||||
httpMethod = "POST",
|
|
||||||
value = "Lock reset on Windows devices",
|
|
||||||
notes = "Lock reset on Windows devices.Its use to reset the device pass code",
|
|
||||||
response = Activity.class,
|
|
||||||
tags = "Windows Device Management Administrative Service",
|
|
||||||
authorizations = {
|
|
||||||
@Authorization(
|
|
||||||
value="permission",
|
|
||||||
scopes = { @AuthorizationScope(
|
|
||||||
scope = "/device-mgt/devices/owning-device/operations/windows/lock-reset",
|
|
||||||
description = "Lock reset") }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@ApiResponses(value = {
|
|
||||||
@ApiResponse(
|
|
||||||
code = 201,
|
|
||||||
message = "Created. \n Successfully scheduled the lock-reset operation.",
|
|
||||||
response = Activity.class,
|
response = Activity.class,
|
||||||
responseHeaders = {
|
responseHeaders = {
|
||||||
@ResponseHeader(
|
@ResponseHeader(
|
||||||
@ -362,15 +492,16 @@ public interface DeviceManagementAdminService {
|
|||||||
message = "Bad Request. \n Invalid request or validation error."),
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 415,
|
code = 415,
|
||||||
message = "Unsupported media type. \n The format of the requested entity was not supported."),
|
message = "Unsupported media type. \n The format of the requested entity was not supported.\n"),
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
code = 500,
|
code = 500,
|
||||||
message = "Internal Server Error. \n " +
|
message = "Internal Server Error. \n " +
|
||||||
"Server error occurred while adding adding a lock-reset operation.")
|
"Server error occurred while adding the new device reboot operation.")
|
||||||
})
|
})
|
||||||
Response lockReset(@HeaderParam("Accept") String acceptHeader, @ApiParam(
|
Response rebootDevice(
|
||||||
name = "deviceIDs",
|
@ApiParam(
|
||||||
value = "Provide the ID of the A Windows device. Multiple device IDs can be added by " +
|
name = "deviceIDs",
|
||||||
"using comma separated values. ",
|
value = "Provide the ID of the Android device. Multiple device IDs can be added using comma separated values. ",
|
||||||
required = true) List<String> deviceIds) throws WindowsDeviceEnrolmentException;
|
required = true)
|
||||||
|
List<String> deviceIDs);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for Syncml message flow.
|
* Interface for Windows 10 Device management phase.
|
||||||
*/
|
*/
|
||||||
@SwaggerDefinition(
|
@SwaggerDefinition(
|
||||||
info = @Info(
|
info = @Info(
|
||||||
@ -44,18 +44,18 @@ import javax.ws.rs.core.Response;
|
|||||||
title = "",
|
title = "",
|
||||||
extensions = {
|
extensions = {
|
||||||
@Extension(properties = {
|
@Extension(properties = {
|
||||||
@ExtensionProperty(name = "name", value = "Syncml Endpoint"),
|
@ExtensionProperty(name = "name", value = "Windows 10 Device management"),
|
||||||
@ExtensionProperty(name = "context",
|
@ExtensionProperty(name = "context",
|
||||||
value = "/api/device-mgt/windows/v1.0/syncmlmgt"),
|
value = "/api/device-mgt/windows/v1.0/management"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows syncml service to initialize management session",
|
@Api(value = "Windows 10 Device management",
|
||||||
description = "This carries all the resources related to Windows syncml message flow.")
|
description = "This carries all the resources related to Windows 10 management session message flow.")
|
||||||
@Path("/devicemgt")
|
@Path("/devicemgt")
|
||||||
public interface DeviceManagementService {
|
public interface DeviceManagementService {
|
||||||
@Path("/pending-operations")
|
@Path("/pending-operations")
|
||||||
|
|||||||
@ -41,17 +41,17 @@ import javax.ws.rs.core.Response;
|
|||||||
title = "",
|
title = "",
|
||||||
extensions = {
|
extensions = {
|
||||||
@Extension(properties = {
|
@Extension(properties = {
|
||||||
@ExtensionProperty(name = "name", value = "Windows Binary security token provider"),
|
@ExtensionProperty(name = "name", value = "Windows Binary Security Token Service"),
|
||||||
@ExtensionProperty(name = "context",
|
@ExtensionProperty(name = "context",
|
||||||
value = "/api/device-mgt/windows/v1.0/federated"),
|
value = "/api/device-mgt/windows/v1.0/federated"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows BST Management",
|
@Api(value = "Windows Binary Security Token Service",
|
||||||
description = "This carries all the resources related to Windows Binary security token management.")
|
description = "This carries all the resources related to Windows Binary security token management.")
|
||||||
@WebService
|
@WebService
|
||||||
@Path("/bst")
|
@Path("/bst")
|
||||||
|
|||||||
@ -48,17 +48,17 @@ import javax.xml.ws.soap.SOAPBinding;
|
|||||||
title = "",
|
title = "",
|
||||||
extensions = {
|
extensions = {
|
||||||
@Extension(properties = {
|
@Extension(properties = {
|
||||||
@ExtensionProperty(name = "name", value = "Windows Discovery service provider"),
|
@ExtensionProperty(name = "name", value = "Windows Discovery Service"),
|
||||||
@ExtensionProperty(name = "context",
|
@ExtensionProperty(name = "context",
|
||||||
value = "/api/device-mgt/windows/v1.0/discovery/post"),
|
value = "/api/device-mgt/windows/v1.0/discovery/post"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows Discovery service",
|
@Api(value = "Windows Discovery Service",
|
||||||
description = "This carries all the resources related to Windows Discovery service.")
|
description = "This carries all the resources related to Windows Discovery service.")
|
||||||
@WebService(targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE,
|
@WebService(targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE,
|
||||||
name = "IDiscoveryService")
|
name = "IDiscoveryService")
|
||||||
@ -133,54 +133,4 @@ public interface DiscoveryService {
|
|||||||
javax.xml.ws.Holder<DiscoveryResponse> response
|
javax.xml.ws.Holder<DiscoveryResponse> response
|
||||||
) throws WindowsDeviceEnrolmentException;
|
) throws WindowsDeviceEnrolmentException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(
|
|
||||||
httpMethod = "GET",
|
|
||||||
value = "Device ping the server to check whether it is running or not.",
|
|
||||||
notes = ".",
|
|
||||||
tags = "Windows Discovery service.",
|
|
||||||
authorizations = {
|
|
||||||
@Authorization(
|
|
||||||
value = "permission",
|
|
||||||
scopes = {@AuthorizationScope(scope = "/device-mgt/devices/enroll/windows",
|
|
||||||
description = "Ping the Discovery service")}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@ApiResponses(
|
|
||||||
value = {
|
|
||||||
@ApiResponse(
|
|
||||||
code = 200,
|
|
||||||
message = "OK. \n Server is already running."),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 303,
|
|
||||||
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.")
|
|
||||||
}),
|
|
||||||
@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. You must provide" +
|
|
||||||
" 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 The specified resource does not exist."),
|
|
||||||
@ApiResponse(
|
|
||||||
code = 500,
|
|
||||||
message = "Error occurred while pinging the server.")
|
|
||||||
})
|
|
||||||
@GET
|
|
||||||
@WebMethod
|
|
||||||
@WebResult()
|
|
||||||
Response discoverGet();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -101,21 +101,6 @@ public class DiscoveryServiceImpl implements DiscoveryService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the first method called through device. The device checks the availability of the
|
|
||||||
* Service end point by calling this method.
|
|
||||||
*
|
|
||||||
* @return - HTTP 200OK message
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Response discoverGet() {
|
|
||||||
|
|
||||||
if (log.isDebugEnabled()) {
|
|
||||||
log.debug("Discovery service end point was triggered via GET method.");
|
|
||||||
}
|
|
||||||
return Response.ok().build();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get authentication policy from the tenant configuration, otherwise set default value as Federated.
|
* Get authentication policy from the tenant configuration, otherwise set default value as Federated.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment;
|
package org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WAPProvisioningException;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WAPProvisioningException;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
|
||||||
@ -27,12 +28,32 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.services.enrollment.beans.R
|
|||||||
import javax.jws.WebMethod;
|
import javax.jws.WebMethod;
|
||||||
import javax.jws.WebParam;
|
import javax.jws.WebParam;
|
||||||
import javax.jws.WebService;
|
import javax.jws.WebService;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
import javax.xml.ws.BindingType;
|
import javax.xml.ws.BindingType;
|
||||||
import javax.xml.ws.RequestWrapper;
|
import javax.xml.ws.RequestWrapper;
|
||||||
import javax.xml.ws.ResponseWrapper;
|
import javax.xml.ws.ResponseWrapper;
|
||||||
import javax.xml.ws.soap.SOAPBinding;
|
import javax.xml.ws.soap.SOAPBinding;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
|
@SwaggerDefinition(
|
||||||
|
info = @Info(
|
||||||
|
version = "1.0.0",
|
||||||
|
title = "",
|
||||||
|
extensions = {
|
||||||
|
@io.swagger.annotations.Extension(properties = {
|
||||||
|
@ExtensionProperty(name = "name", value = "Windows 10 Enrollment Service"),
|
||||||
|
@ExtensionProperty(name = "context",
|
||||||
|
value = "/api/device-mgt/windows/v1.0/deviceenrolment/enrollment"),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
),
|
||||||
|
tags = {
|
||||||
|
@Tag(name = "windows", description = "")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@Api(value = "Windows 10 Enrollment Service",
|
||||||
|
description = "This carries all the resources related to Windows enrollment.")
|
||||||
|
|
||||||
@WebService(targetNamespace = PluginConstants.DEVICE_ENROLLMENT_SERVICE_TARGET_NAMESPACE, name = "enrollment")
|
@WebService(targetNamespace = PluginConstants.DEVICE_ENROLLMENT_SERVICE_TARGET_NAMESPACE, name = "enrollment")
|
||||||
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
|
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
|
||||||
public interface EnrollmentService {
|
public interface EnrollmentService {
|
||||||
@ -42,6 +63,60 @@ public interface EnrollmentService {
|
|||||||
@WebMethod(operationName = "RequestSecurityToken")
|
@WebMethod(operationName = "RequestSecurityToken")
|
||||||
@ResponseWrapper(localName = "RequestSecurityTokenResponseCollection", targetNamespace =
|
@ResponseWrapper(localName = "RequestSecurityTokenResponseCollection", targetNamespace =
|
||||||
PluginConstants.WS_TRUST_TARGET_NAMESPACE)
|
PluginConstants.WS_TRUST_TARGET_NAMESPACE)
|
||||||
|
@POST
|
||||||
|
@ApiOperation(
|
||||||
|
httpMethod = "POST",
|
||||||
|
value = "Signing the certificate signing request(CSR) and provide request security token response.",
|
||||||
|
notes = "Using this API to fetching more information to enroll the Device and " +
|
||||||
|
"getting pending operations.",
|
||||||
|
tags = "Windows 10 Device Enrollment Service.",
|
||||||
|
authorizations = {
|
||||||
|
@Authorization(
|
||||||
|
value = "permission",
|
||||||
|
scopes = {@AuthorizationScope(
|
||||||
|
scope = "/device-mgt/devices/enroll/windows",
|
||||||
|
description = "Signing the certificate signing request(CSR) " +
|
||||||
|
"and provide request security token response")}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(
|
||||||
|
code = 200,
|
||||||
|
message = "Ok.Successfully signed the CSR.",
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "URL of the activity instance that refers to the scheduled operation."),
|
||||||
|
@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 was last modified. \n" +
|
||||||
|
"Used by caches, or in conditional requests.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 303,
|
||||||
|
message = "See Other. \n The source can be retrieved from the URL specified in the location header.",
|
||||||
|
responseHeaders = {
|
||||||
|
@ResponseHeader(
|
||||||
|
name = "Content-Location",
|
||||||
|
description = "The Source URL of the document.")}),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 400,
|
||||||
|
message = "Bad Request. \n Invalid request or validation error."),
|
||||||
|
@ApiResponse(
|
||||||
|
code = 415,
|
||||||
|
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 Signing the CSR.")
|
||||||
|
})
|
||||||
void requestSecurityToken(
|
void requestSecurityToken(
|
||||||
@WebParam(name = "TokenType", targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE)
|
@WebParam(name = "TokenType", targetNamespace = PluginConstants.WS_TRUST_TARGET_NAMESPACE)
|
||||||
String tokenType,
|
String tokenType,
|
||||||
|
|||||||
@ -25,9 +25,8 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
@XmlAccessorType(XmlAccessType.FIELD)
|
@XmlAccessorType(XmlAccessType.PROPERTY)
|
||||||
@XmlType(name = "ContextItem", namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE,
|
@XmlType(name = "ContextItem", namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE)
|
||||||
propOrder = {"Name" , "Value"})
|
|
||||||
public class ContextItem {
|
public class ContextItem {
|
||||||
|
|
||||||
@XmlElement(required = true, namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE)
|
@XmlElement(required = true, namespace = PluginConstants.SOAP_AUTHORIZATION_TARGET_NAMESPACE)
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
package org.wso2.carbon.device.mgt.mobile.windows.api.services.impl;
|
package org.wso2.carbon.device.mgt.mobile.windows.api.services.impl;
|
||||||
|
|
||||||
import com.ibm.wsdl.OperationImpl;
|
import com.ibm.wsdl.OperationImpl;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||||
@ -29,6 +30,7 @@ import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
|
|||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.ErrorResponse;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.beans.ErrorResponse;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.BadRequestException;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.BadRequestException;
|
||||||
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.UnexpectedServerErrorException;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsDeviceEnrolmentException;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsOperationsException;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsOperationsException;
|
||||||
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
|
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message;
|
||||||
@ -268,4 +270,70 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
|
|||||||
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/location")
|
||||||
|
public Response getDeviceLocation(@ApiParam(
|
||||||
|
name = "deviceIDs",
|
||||||
|
value = "Provide the ID of the Windows device. Multiple device IDs can be added by " +
|
||||||
|
"using comma separated values. ",
|
||||||
|
required = true) List<String> deviceIDs) {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("Invoking Windows device location operation.");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
CommandOperation operation = new CommandOperation();
|
||||||
|
operation.setCode(PluginConstants.OperationCodes.DEVICE_LOCATION);
|
||||||
|
operation.setType(Operation.Type.COMMAND);
|
||||||
|
return WindowsAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
|
} catch (OperationManagementException e) {
|
||||||
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new UnexpectedServerErrorException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(errorMessage).build());
|
||||||
|
} catch (DeviceManagementException e) {
|
||||||
|
String errorMessage = "Issue in retrieving device management service instance";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new UnexpectedServerErrorException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(errorMessage).build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/reboot")
|
||||||
|
public Response rebootDevice(@ApiParam(
|
||||||
|
name = "deviceIDs",
|
||||||
|
value = "Provide the ID of the Windows device. Multiple device IDs can be " +
|
||||||
|
"added using comma separated values.",
|
||||||
|
required = true) List<String> deviceIDs) {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("Invoking Windows reboot-device device operation");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
CommandOperation operation = new CommandOperation();
|
||||||
|
operation.setCode(PluginConstants.OperationCodes.DEVICE_REBOOT);
|
||||||
|
operation.setType(Operation.Type.COMMAND);
|
||||||
|
return WindowsAPIUtils.getOperationResponse(deviceIDs, operation);
|
||||||
|
} catch (InvalidDeviceException e) {
|
||||||
|
String errorMessage = "Invalid Device Identifiers found.";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new BadRequestException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build());
|
||||||
|
} catch (OperationManagementException e) {
|
||||||
|
String errorMessage = "Issue in retrieving operation management service instance";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new UnexpectedServerErrorException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(errorMessage).build());
|
||||||
|
} catch (DeviceManagementException e) {
|
||||||
|
String errorMessage = "Issue in retrieving device management service instance";
|
||||||
|
log.error(errorMessage, e);
|
||||||
|
throw new UnexpectedServerErrorException(
|
||||||
|
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(errorMessage).build());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import javax.ws.rs.core.MediaType;
|
|||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for Syncml message flow.
|
* Interface for Windows 8.1 enrollment flow.
|
||||||
*/
|
*/
|
||||||
@SwaggerDefinition(
|
@SwaggerDefinition(
|
||||||
info = @Info(
|
info = @Info(
|
||||||
@ -43,17 +43,17 @@ import javax.ws.rs.core.Response;
|
|||||||
title = "",
|
title = "",
|
||||||
extensions = {
|
extensions = {
|
||||||
@Extension(properties = {
|
@Extension(properties = {
|
||||||
@ExtensionProperty(name = "name", value = "Syncml Endpoint"),
|
@ExtensionProperty(name = "name", value = "Windows 8.1 Device Management Service"),
|
||||||
@ExtensionProperty(name = "context",
|
@ExtensionProperty(name = "context",
|
||||||
value = "/api/device-mgt/windows/v1.0/syncml"),
|
value = "/api/device-mgt/windows/v1.0/syncml"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows syncml service",
|
@Api(value = "Windows 8.1 Device Management Service",
|
||||||
description = "This carries all the resources related to Windows syncml message flow.")
|
description = "This carries all the resources related to Windows syncml message flow.")
|
||||||
@Path("/devicemanagement")
|
@Path("/devicemanagement")
|
||||||
public interface SyncmlService {
|
public interface SyncmlService {
|
||||||
|
|||||||
@ -235,7 +235,6 @@ public class SyncmlServiceImpl implements SyncmlService {
|
|||||||
String devLang;
|
String devLang;
|
||||||
String vendor;
|
String vendor;
|
||||||
String macAddress;
|
String macAddress;
|
||||||
String resolution;
|
|
||||||
String modVersion;
|
String modVersion;
|
||||||
boolean status = false;
|
boolean status = false;
|
||||||
String user;
|
String user;
|
||||||
|
|||||||
@ -47,14 +47,14 @@ import java.io.UnsupportedEncodingException;
|
|||||||
title = "",
|
title = "",
|
||||||
extensions = {
|
extensions = {
|
||||||
@Extension(properties = {
|
@Extension(properties = {
|
||||||
@ExtensionProperty(name = "name", value = "Windows enrollment service provider"),
|
@ExtensionProperty(name = "name", value = "Windows 8.1 Enrollment Service"),
|
||||||
@ExtensionProperty(name = "context",
|
@ExtensionProperty(name = "context",
|
||||||
value = "/api/device-mgt/windows/v1.0/deviceenrolment/wstep"),
|
value = "/api/device-mgt/windows/v1.0/deviceenrolment/wstep"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows Enrollment service Management",
|
@Api(value = "Windows Enrollment service Management",
|
||||||
|
|||||||
@ -47,17 +47,17 @@ import javax.xml.ws.soap.SOAPBinding;
|
|||||||
title = "",
|
title = "",
|
||||||
extensions = {
|
extensions = {
|
||||||
@io.swagger.annotations.Extension(properties = {
|
@io.swagger.annotations.Extension(properties = {
|
||||||
@ExtensionProperty(name = "name", value = "Windows Enrollment policy service"),
|
@ExtensionProperty(name = "name", value = "Windows Enrollment policy Service"),
|
||||||
@ExtensionProperty(name = "context",
|
@ExtensionProperty(name = "context",
|
||||||
value = "/api/device-mgt/windows/v1.0/certificatepolicy/xcep"),
|
value = "/api/device-mgt/windows/v1.0/certificatepolicy/xcep"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
tags = {
|
tags = {
|
||||||
@Tag(name = "devicemgt_windows", description = "")
|
@Tag(name = "windows", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Api(value = "Windows enrollment policy Management",
|
@Api(value = "Windows Enrollment policy Service",
|
||||||
description = "This carries all the resources related to Windows enrollment policy.")
|
description = "This carries all the resources related to Windows enrollment policy.")
|
||||||
@WebService(targetNamespace = PluginConstants.CERTIFICATE_ENROLLMENT_POLICY_SERVICE_TARGET_NAMESPACE,
|
@WebService(targetNamespace = PluginConstants.CERTIFICATE_ENROLLMENT_POLICY_SERVICE_TARGET_NAMESPACE,
|
||||||
name = "IPolicy")
|
name = "IPolicy")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user