restful api rebuild