fix restful api issue of addDevice