add restAPI for test