@Override
  public Result process() {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Handling API Request: '{}'", getURI());
    }

    Result result;
    try {
      parseRenderer();
      parseQueryPredicate();
      result = getRequestHandler().handleRequest(this);
    } catch (InvalidQueryException e) {
      String message = "Unable to compile query predicate: " + e.getMessage();
      LOG.error(message, e);
      result = new ResultImpl(new ResultStatus(ResultStatus.STATUS.BAD_REQUEST, message));
    } catch (IllegalArgumentException e) {
      String message = "Invalid Request: " + e.getMessage();
      LOG.error(message, e);
      result = new ResultImpl(new ResultStatus(ResultStatus.STATUS.BAD_REQUEST, message));
    }

    if (! result.getStatus().isErrorState()) {
      getResultPostProcessor().process(result);
    }

    return result;
  }
Constructor.

@param headers           http headers
@param body              http body
@param uriInfo           uri information
@param resource          associated resource definition
ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseRequest.java