ptables - model and api