Members can be removed from a Space through the "removeSpaceMembers" mutation on a WWClient or WWGraphQLEndpoint. The method takes a List of member IDs. The methods return an ArrayList of members IDs removed.

 


@Test(enabled = true)
@Parameters({ "appId", "appSecret","space2Id", "profileId" })
public void removeMembersToSpace(String appId, String appSecret, String space2Id, String profileId) throws WWException, UnsupportedEncodingException {
    WWClient client = WWClient.buildClientApplicationAccess(appId, appSecret, new WWAuthenticationEndpoint());
    client.authenticate();
    List<String> members = new ArrayList<String>();
    members.add(profileId);
    List<String> ids = client.removeSpaceMembers(space2Id, members);
    assert ids.size() == 1;
}