Unfortunately, the current resources only allow adding one group membership at a time, either through the user or group resources. You will need to make several calls.
There is an open feature request (CWD-2378) to add bulk operations to the resources.