@Override
    public boolean processParams(String[] args) throws Exception {
        CommandLine cli = parser.parse(options, args);
        if (cli == null) {
            throw new ParseException("Parse args failure");
        }
        if (cli.hasOption(CliArgDef.VERSION.longOpt)) {
            version();
        }
        if (cli.hasOption(CliArgDef.HELP.longOpt)) {
            help();
        }
        String masterAddr = defMasterPortal;
        if (cli.hasOption(CliArgDef.MASTERPORTAL.longOpt)) {
            masterAddr = cli.getOptionValue(CliArgDef.MASTERPORTAL.longOpt);
            if (TStringUtils.isBlank(masterAddr)) {
                throw new Exception(CliArgDef.MASTERPORTAL.longOpt + " is required!");
            }
        }
        JsonObject result = null;
        String masterUrl = "http://" + masterAddr + "/webapi.htm";
        if (cli.hasOption(CliArgDef.ADMINMETHOD.longOpt)) {
            Map<String, String> inParamMap = new HashMap<>();
            inParamMap.put(CliArgDef.METHOD.longOpt, "admin_get_methods");
            result = HttpUtils.requestWebService(masterUrl, inParamMap);
            System.out.println(formatResult(result));
            System.exit(0);
        }
        String methodStr = cli.getOptionValue(CliArgDef.METHOD.longOpt);
        if (TStringUtils.isBlank(methodStr)) {
            throw new Exception(CliArgDef.METHOD.longOpt + " is required!");
        }
        requestParams.put(CliArgDef.METHOD.longOpt, methodStr);
        Map<String, String> convertedRequestParams = convertRequestParams(requestParams);
        result = HttpUtils.requestWebService(masterUrl, convertedRequestParams);
        String formattedResult = formatResult(result);
        System.out.println(formattedResult);
        return true;
    }
Call the Web API

@param args Request parameters of method name,
            {"--method", "admin_query_topic_info"} as an example
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/CliWebapiAdmin.java