Put all the API related code in c.n.r.web.rest.directive