get groups from API