Rest API in coffeescript