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" })
public void removeMembersToSpace(String appId, String appSecret, String space2Id, String profileId) throws WWException, UnsupportedEncodingException {
    WWClient client = WWClient.buildClientApplicationAccess(appId, appSecret, new WWAuthenticationEndpoint());
    List<String> members = new ArrayList<String>();
    List<String> ids = client.removeSpaceMembers(space2Id, members);
    assert ids.size() == 1;