abstract ajax requests for groups