use restful api