@@ -64,6 +64,16 @@ export class DeviceClient {
6464 return this . apiClient . releaseDevice ( deviceId ) ;
6565 }
6666
67+ /**
68+ * Reset device. If the device is a mobile device, the device cleanup workflow will be started. In case of a desktop device, the
69+ * machine will be rolled back to the latest snapshop, if one exists.
70+ *
71+ * @param deviceId DeviceId of device. Can be found in "Details" dialog of an item in webmate device overview.
72+ */
73+ public resetDevice ( deviceId : DeviceId ) : Observable < void > {
74+ return this . apiClient . releaseDevice ( deviceId ) ;
75+ }
76+
6777 /**
6878 * Redeploy device. The device will be released and redeployed with the same properties as before.
6979 *
@@ -169,6 +179,7 @@ export class DeviceApiClient extends WebmateAPIClient {
169179 private requestDeviceByRequirementsForProjectRoute = new UriTemplate ( "/projects/${projectId}/device/devices" ) ;
170180 private synchronizeDeviceRoute = new UriTemplate ( "/device/devices/${deviceId}/sync" ) ;
171181 private releaseDeviceRoute = new UriTemplate ( "/device/devices/${deviceId}" ) ;
182+ private resetDeviceRoute = new UriTemplate ( "/device/devices/${deviceId}/reset" ) ;
172183 private redeployDeviceRoute = new UriTemplate ( "/device/devices/${deviceId}/redeploy" ) ;
173184
174185 private installAppOnDeviceRoute = new UriTemplate ( "/device/${deviceId}/appinstall/${packageId}" ) ;
@@ -196,6 +207,10 @@ export class DeviceApiClient extends WebmateAPIClient {
196207 return this . sendDELETE ( this . releaseDeviceRoute , Map ( { "deviceId" : deviceId } ) ) ;
197208 }
198209
210+ public resetDevice ( deviceId : DeviceId ) : Observable < void > {
211+ return this . sendPOST ( this . resetDeviceRoute , Map ( { "deviceId" : deviceId } ) ) ;
212+ }
213+
199214 public redeployDevice ( deviceId : DeviceId ) : Observable < void > {
200215 return this . sendPOST ( this . redeployDeviceRoute , Map ( { "deviceId" : deviceId } ) ) ;
201216 }
0 commit comments