@GET
  @Path("/zip")
  @Consumes(MediaType.APPLICATION_JSON)
  @Produces("application/zip")
  public Response zipByRequestId(@QueryParam("requestId") String requestId) {
    LOG.info("Starting zip download requestId : {}", requestId);
    try {
      DownloadRequest request = getDownloadRequest(requestId);
      return downloadGZip(request);
    } catch (WebApplicationException ex) {
      LOG.error("Error occurred : ", ex);
      throw ex;
    } catch (Exception ex) {
      LOG.error("Error occurred : ", ex);
      throw new ServiceFormattedException(ex.getMessage(), ex);
    }
  }
Download zip by unique link
@param requestId id of request
@return response with zip
contrib/views/files/src/main/java/org/apache/ambari/view/filebrowser/DownloadService.java