using entityapi for rules
api docs
api docs