Restful api implementation