added rest api to daemon