API Reference

Groups.addMembersToGroupByFilters

This method adds multiple users to a group based on supplied parameters. It supports the same filters at users.getUsers

Syntax

bool groups.addMembersToGroupByFilters ( int vhost, int groupID, array filters = array(), bool removeExistingMembers = false )

Arguments

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost ID that the group and user belong to.
groupIDintRequirednoneThe ID of the group that you are adding the user to.
filtersarrayOptionalarray()getUsers filter - please see users.getUsers for further details.
removeExistingMembersboolOptionalfalseIf set to TRUE/1 all members of the group will be removed before the new users are added, otherwise new users will be added to existing

Response

Will return whether or not the member has been successfully added to the desired group.

NameTypeDescription
resultINTUpon success the response will be 1.

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/groups/addMembersToGroupByFilters?vhostID=[VHOST_ID]&groupID=[GROUPID]&filters[]=[filter1]&removeExistingMembers=1&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
															    
														    
														

Code examples

0 comments

Be the first to comment on addMembersToGroupByFilters.

Add a Comment

  • captcha