Account Owner, Account Administrators, Department Administrators, or custom roles.
|X-Auth-Account-Url (required)||The base URL of the account, e.g. http://myaccount.ispringlearn.com.|
|X-Auth-Email (required)||The login of Account Owner, Account Administrator, Department Administrator, or a user with a role with custom settings allowing them to replace group users.|
|X-Auth-Password (required)||The password of Account Owner, Account Administrator, Department Administrator, or a user with a role with custom settings allowing them to replace group users.|
|group_id (required)||The ID of a group whose users you want to replace.|
The users whose IDs are indicated in the method will completely replace existing group members. That means that an empty userIds parameter sent within the method will remove all users from the group. If two user IDs are sent, all previous groups members will be deleted from the group and two new participants will be added.
Let's say, a Department Administrator or a user with a role with custom settings allowing them to replace group users sends a list of new users which should be added to the group. There are already some users in the group, both from departments the sender manages and from departments the sender doesn't have access to.
After the method is performed, all new users sent within the method will be added to the group. But concerning existing members, only users from the departments the sender manages and their daughter departments will be removed.
Participants who belong to the departments which aren't managed by the sender will remain in the group.
|200||Successful operation||Users replacement was successfully completed.|
|400||Bad Request||A request error.|
|401||Unauthorized||An authorization error.|
|403||Permission denied||The user doesn't have enough permissions to replace group users.|
POST /group/b1496214-acab-11e9-8db0-120a62f268a9/members HTTP/1.1 Host: api-learn.ispringlearn.com X-Auth-Account-Url: http://myaccount.ispringlearn.com X-Auth-Email: email@example.com X-Auth-Password: password Content-Type:application/xml <?xml version="1.0" encoding="UTF-8"?> <request> <userIds> <id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id> <id>16b113ea-e2e9-11e9-87d9-aa9d91baa591</id> </userIds> </request>
HTTP/1.1 200 Successful operation Connection: close