add new base class for restfulapi