make RESTFUL api work