Use macros to generate the REST methods