private Execution<Object, ?, ?> executeOnRegion(String functionId, String region,
      String argsInBody) {
    logger.debug("Executing Function ({}) with arguments ({}) on Region ({})...", functionId,
        ArrayUtils.toString(argsInBody), region);

    region = decode(region);
    try {
      @SuppressWarnings("unchecked")
      Execution<Object, ?, ?> execution = FunctionService.onRegion(getRegion(region));
      return execution;
    } catch (FunctionException fe) {
      throw new GemfireRestException(
          String.format("The Region identified by name (%1$s) could not found!", region), fe);
    }
  }
Execute a function on Gemfire data node using REST API call. Arguments to the function are
passed as JSON string in the request body.

@param functionId represents function to be executed
@param region list of regions on which function to be executed.
@param members list of nodes on which function to be executed.
@param groups list of groups on which function to be executed.
@param filter list of keys which the function will use to determine on which node to execute
       the function.
@param argsInBody function argument as a JSON document
@return result as a JSON document
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/FunctionAccessController.java