initial RESTful api code