Added REST functionality for the groups API

Should we check `!_.isEmptyObject` as well?