private void handleNamespace(
      Context ctx, BiFunction<InternalCatalog, String, ? extends RESTResponse> handler) {
    handleCatalog(
        ctx,
        catalog -> {
          String ns = ctx.pathParam("namespace");
          Preconditions.checkNotNull(ns, "namespace is null");
          checkUnsupported(!ns.contains("."), "multi-level namespace is not supported");
          checkDatabaseExist(catalog.databaseExists(ns), ns);
          return handler.apply(catalog, ns);
        });
  }
POST PREFIX/v1/catalogs/{catalog}/namespaces/{namespace}/tables/{table}/metrics
amoro-ams/src/main/java/org/apache/amoro/server/RestCatalogService.java