add restful api for device