restfulAPI with rethinkdb