server impl for get all groups and get group by id

resolves HACK-1234