add init and revert back gen_rest_server deletion