Added groups functionality to the api