Add support for REST and implement some REST methods