An adaptive stateless REST API plugin for CakePHP