@GET
  @Path("/readAsset")
  public Response readAsset(@QueryParam("assetPath") String assetPath) {
    if (StringUtils.isEmpty(assetPath)) {
      throw new WfmWebException(ErrorCode.INVALID_EMPTY_INPUT);
    }
    try {
      final InputStream is = workflowFilesService.readAssset(assetPath);
      StreamingOutput streamer = utils.streamResponse(is);
      return Response.ok(streamer).status(200).build();
    } catch (IOException ex) {
      LOGGER.error(ex.getMessage(),ex);
      throw new WfmWebException(ex);
    }
  }
This is a class used to bridge the communication between the and the Oozie
API executing inside ambari.
contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java