restful api controller