private void handleTable(
      Context ctx,
      Function<InternalTableHandler<TableOperations>, ? extends RESTResponse> tableHandler) {
    handleNamespace(
        ctx,
        (catalog, database) -> {
          String tableName = ctx.pathParam("table");
          Preconditions.checkNotNull(tableName, "table name is null");
          try (InternalTableHandler<TableOperations> internalTableHandler =
              catalog.newTableHandler(database, tableName)) {
            return tableHandler.apply(internalTableHandler);
          }
        });
  }
POST PREFIX/v1/catalogs/{catalog}/namespaces/{namespace}/tables/{table}/metrics
amoro-ams/src/main/java/org/apache/amoro/server/RestCatalogService.java