code: private void handleGetMetricHistory(final int executorId, final HttpServletRequest req,
        final HashMap<String, Object> ret, final User user) throws IOException,
        ServletException {
      try {
        final Map<String, Object> result =
            this.execManagerAdapter.callExecutorStats(executorId,
                ConnectorParams.STATS_GET_METRICHISTORY, getAllParams(req));
        if (result.containsKey(ConnectorParams.RESPONSE_ERROR)) {
          ret.put(ConnectorParams.RESPONSE_ERROR,
              result.get(ConnectorParams.RESPONSE_ERROR).toString());
        } else {
          ret.put("data", result.get("data"));
        }
      } catch (final ExecutorManagerException ex) {
        logger.error(ex.getMessage(), ex);
        ret.put("error", "Failed to fetch metric history");
      }
    }
docs: Get metric snapshots for a metric and date specification