@ RequestMapping ( value = "/spaces/snapshots/{storeId}/{snapshotId}/restore-space-id" , method = RequestMethod . GET ) @ ResponseBody public String restoreSpaceId ( HttpServletRequest request , @ PathVariable ( "storeId" ) String storeId , @ PathVariable ( "snapshotId" ) String snapshotId ) throws Exception { ContentStore contentStore = getContentStore ( storeId ) ; String spaceId = SnapshotIdentifier . parseSnapshotId ( snapshotId ) . getRestoreSpaceId ( ) ; if ( contentStore . spaceExists ( spaceId ) ) { return "{ \"spaceId\": \"" + spaceId + "\"," + "\"storeId\": \"" + storeId + "\"}" ; } else { return "{}" ; } }
Returns the name of the restore space if it exists associated with a snapshot