private ObjectNode executeQuery(HttpServletRequest request, String query, String members,
      int limit) {
    ObjectNode queryResult = mapper.createObjectNode();
    try {

      if (StringUtils.isNotBlank(query)) {
        // get cluster object
        Cluster cluster = repository.getCluster();
        String userName = request.getUserPrincipal().getName();

        // Add html escaped query to history
        String escapedQuery = StringEscapeUtils.escapeHtml4(query);
        cluster.addQueryInHistory(escapedQuery, userName);

        // Call execute query method
        queryResult = cluster.executeQuery(query, members, limit);
      }
    } catch (Exception e) {
      logger.debug("Exception Occurred : ", e);
    }
    return queryResult;
  }
This method creates json for list of cluster regions

@return ArrayNode JSON array
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/controllers/PulseController.java