rewrite rest config
update public api
update javascript unit tests