public static Result getCurrentRunParameters() {
    final Timer.Context context = AutoTuningMetricsController.getCurrentRunParametersTimerContext();
    String jsonString = request().body().asJson().toString();
    logger.debug("Started processing getCurrentRunParameters request with following parameters " + jsonString);
    ObjectMapper mapper = new ObjectMapper();
    Map<String, String> paramValueMap = new HashMap<String, String>();
    TuningInput tuningInput = new TuningInput();
    try {
      paramValueMap = (Map<String, String>) mapper.readValue(jsonString, Map.class);
      String flowDefId = paramValueMap.get("flowDefId");
      String jobDefId = paramValueMap.get("jobDefId");
      String flowDefUrl = paramValueMap.get("flowDefUrl");
      String jobDefUrl = paramValueMap.get("jobDefUrl");
      String flowExecId = paramValueMap.get("flowExecId");
      String jobExecId = paramValueMap.get("jobExecId");
      String flowExecUrl = paramValueMap.get("flowExecUrl");
      String jobExecUrl = paramValueMap.get("jobExecUrl");
      String jobName = paramValueMap.get("jobName");
      String userName = paramValueMap.get("userName");
      String client = paramValueMap.get("client");
      String scheduler = paramValueMap.get("scheduler");
      String defaultParams = paramValueMap.get("defaultParams");
      Integer version = 1;
      if (paramValueMap.containsKey("version")) {
        version = Integer.parseInt(paramValueMap.get("version"));
      }
      Boolean isRetry = false;
      if (paramValueMap.containsKey("isRetry")) {
        isRetry = Boolean.parseBoolean(paramValueMap.get("isRetry"));
      }
      Boolean skipExecutionForOptimization = false;
      if (paramValueMap.containsKey("skipExecutionForOptimization")) {
        skipExecutionForOptimization = Boolean.parseBoolean(paramValueMap.get("skipExecutionForOptimization"));
      }
      String jobType = paramValueMap.get("autoTuningJobType");
      String optimizationAlgo = paramValueMap.get("optimizationAlgo");
      String optimizationAlgoVersion = paramValueMap.get("optimizationAlgoVersion");
      String optimizationMetric = paramValueMap.get("optimizationMetric");

      Double allowedMaxExecutionTimePercent = null;
      Double allowedMaxResourceUsagePercent = null;
      if (paramValueMap.containsKey("allowedMaxResourceUsagePercent")) {
        allowedMaxResourceUsagePercent = Double.parseDouble(paramValueMap.get("allowedMaxResourceUsagePercent"));
      }
      if (paramValueMap.containsKey("allowedMaxExecutionTimePercent")) {
        allowedMaxExecutionTimePercent = Double.parseDouble(paramValueMap.get("allowedMaxExecutionTimePercent"));
      }
      tuningInput.setFlowDefId(flowDefId);
      tuningInput.setJobDefId(jobDefId);
      tuningInput.setFlowDefUrl(flowDefUrl);
      tuningInput.setJobDefUrl(jobDefUrl);
      tuningInput.setFlowExecId(flowExecId);
      tuningInput.setJobExecId(jobExecId);
      tuningInput.setFlowExecUrl(flowExecUrl);
      tuningInput.setJobExecUrl(jobExecUrl);
      tuningInput.setJobName(jobName);
      tuningInput.setUserName(userName);
      tuningInput.setClient(client);
      tuningInput.setScheduler(scheduler);
      tuningInput.setDefaultParams(defaultParams);
      tuningInput.setVersion(version);
      tuningInput.setRetry(isRetry);
      tuningInput.setSkipExecutionForOptimization(skipExecutionForOptimization);
      tuningInput.setJobType(jobType);
      tuningInput.setOptimizationAlgo(optimizationAlgo);
      tuningInput.setOptimizationAlgoVersion(optimizationAlgoVersion);
      tuningInput.setOptimizationMetric(optimizationMetric);
      tuningInput.setAllowedMaxExecutionTimePercent(allowedMaxExecutionTimePercent);
      tuningInput.setAllowedMaxResourceUsagePercent(allowedMaxResourceUsagePercent);
      return getCurrentRunParameters(tuningInput);
    } catch (Exception e) {
      AutoTuningMetricsController.markGetCurrentRunParametersFailures();
      logger.error("Exception parsing input: ", e);
      return notFound("Error parsing input " + e.getMessage());
    } finally {
      if (context != null) {
        context.stop();
      }
    }
  }
Rest API for getting current run parameters from auto tuning framework
@return
app/controllers/Application.java