Rewrote RestApi to use chaining in config