Group
Groups are used to represent and manage a collection of brainCloud users. They are most commonly used to represent Teams in apps, and Clans in games.
Groups are designed as follows:
- Groups consist of a collection of members (users)
- Groups have a name, a type, an id, and custom data
- Members are each assigned a role-based permission level:
"OWNER"
,"ADMIN"
, or"MEMBER"
- Groups have one (and only one)
"OWNER"
. The OWNER of a group can add/remove members, and delete the group - Groups can have multiple
"ADMIN"
s. ADMINs are like OWNERs, except that they cannot delete the group. - Any
"MEMBER"
can edit group data
- Groups have one (and only one)
- MEMBERs of a group can have custom
attributes
associated with them (can be used for custom application roles, etc.) - Users can be members of more than one group
- Users can be the owner of more than one group
- Groups can also have associated Entities (i.e.
GroupEntity
)
Groups are made up of the following attributes:
Attribute | Description |
---|---|
groupId | ID of the group |
ownerId | ProfileId of the end-user who owns the group |
name | Name of the group |
type | Type of group. This is a developer-defined type, that establishes some rules for the group. |
members | the members of the group |
pendingMembers | members who have been invited to the group, but have not yet accepted |
data | json-data associated with the group |
acl | controls visibility of data and members list for non-members |
To create a group you must first configure a Group Type on the Group Types page of the brainCloud portal.
API Summary
Group Management
- CreateGroup - create a group
- CreateGroupWithSummaryData - Create a group.
- DeleteGroup - delete the specified group
- IncrementGroupData - increment numeric values in the group's data
- ReadGroup - read the specified group
- ReadGroupData - read the data object of specified group
- SetGroupOpen - set if user's can join the group
- UpdateGroupAcl - update the acl permissions of the specified group
- UpdateGroupName - update the name of the specified group
- UpdateGroupData - update the JSON data of the specified group
- UpdateGroupSummaryData - update a group's summary data
- DeleteGroupJoinRequest - Delete a request to join the group
Group members
- AddGroupMember - add a member to the group
- AutoJoinGroup - auto-joins an open group that matches the criteria
- AutoJoinGroupMulti - use when there are multiple group types to consider when auto-joining
- CancelGroupInvitation - cancel a previously sent invitation
- InviteGroupMember - invite a member to the group
- JoinGroup - join an open group or request membership in a closed group.
- LeaveGroup - leave the specified group
- ReadGroupMembers - returns a list of the group's members
- RejectGroupInvitation - reject a group invitation
- RemoveGroupMember - remove the specified member from the group
- UpdateGroupMember - update the group member's attributes
Locating Groups
- ListGroupsPage - list first page of groups that match the specified query
- ListGroupsPageByOffset - get next/prev page
- ListGroupsWithMember - list groups that include the specified member
- GetMyGroups - return groups that the current user is a member of
- GetRandomGroupsMatching - gets a list of randomly selected groups from the server
Group entities
- CreateGroupEntity - create an entity
- DeleteGroupEntity - delete an entity
- IncrementGroupEntityData - increment numeric values in the entity's data
- ReadGroupEntitiesPage - returns a list of entities that match the query
- ReadGroupEntitiesPageByOffset - get next/prev page
- ReadGroupEntity - reads the specified entity
- UpdateGroupEntityData - updates the specified entity
- UpdateGroupEntityAcl - Update the acl settings for a group entity, enforcing ownership.
System calls
- SysAddGroupMember - add a user as a member to the group, bypassing ownership/ACL checks. Optional parameters: role OR attributes.
- SysChangeGroupType - changes the group type
- SysCreateGroup - create a group
- SysCreateGroupEntity - create an entity in the group with no owner
- SysDeleteGroup - delete a group
- SysDeleteGroupEntity - delete an entity in the group
- SysGetRandomGroupsMatching - Gets a list of up to maxReturn randomly selected groups from the server based on the where condition, bypassing ownership/ACL checks
- SysIncrementGroupData - partial increment of group data field items. Partial set of items incremented as specified
- SysIncrementGroupEntityData - partial increment of group entity data field items. Partial set of items incremented as specified
- SysIsGroupMember - Verifies if user is a group member and returns information about group member, bypassing ownership/ACL checks
- SysListGroupsPage - retrieve a page of group summary information based on the specified context
- SysListGroupsPageByOffset - retrieve a page of group summary information based on the encoded context and specified page offset
- SysReadGroup - retrieve information about the group
- SysReadGroupData - retrieve a group's data object
- SysReadGroupEntitiesPage - retrieve a page of group entity information based on the specified context
- SysReadGroupEntitiesPageByOffset - retrieve a page of group entity information based on the encoded context and specified page offset
- SysReadGroupEntity - read an entity in the group
- SysReadGroupMembers - read all members in the group
- SysRemoveGroupMember - Remove a member from the group, bypassing group ownership/ACL checks.
- SysSetGroupOpen - Set whether a group is open (true) or closed (false)
- SysUpdateGroupAcl - update a group's access conditions
- SysUpdateGroupData - update a group's data
- SysUpdateGroupEntityData - update the data for a group entity
- SysUpdateGroupMember - update a member of the group
- SysUpdateGroupName - update a group's name
- SysUpdateGroupSummaryData - update a group's summary data
- SysUpdateGroupEntityAcl - Update the acl settings for a group entity, bypassing ownership/ACL checks.
📄️ AcceptGroupInvitation
Accept an invitation to become a member of the group.
📄️ AddGroupMember
Add a member to the group. Optional parameters: jsonAttributes.
📄️ ApproveGroupJoinRequest
Approve an outstanding request to join the group. Optional parameters: jsonAttributes.
📄️ AutoJoinGroup
Automatically join an open group (isOpenGroup) that matches the search criteria and has space available.
📄️ AutoJoinGroupMulti
Find and join an open group in the pool of groups in multiple group types provided as input arguments.
📄️ CancelGroupInvitation
Cancel an outstanding invitation to the group.
📄️ CreateGroup
Create a group.
📄️ CreateGroupEntity
Create an entity in the group. Optional parameters: entityType, acl and jsonData
📄️ CreateGroupWithSummaryData
Create a group. Optional parameters: all except name and groupType.
📄️ DeleteGroup
Delete a group.
📄️ DeleteGroupEntity
Delete an entity in the group.
📄️ DeleteGroupJoinRequest
Delete a request to join the group.
📄️ GetMyGroups
Retrieve group information about the groups in which the current user is a member.
📄️ GetRandomGroupsMatching
Gets a list of up to maxReturn randomly selected groups from the server based on the where condition.
📄️ IncrementGroupData
Increment elements for the group's data field.
📄️ IncrementGroupEntityData
Increment elements for a group entity's data field.
📄️ InviteGroupMember
Invite a user to the group.
📄️ JoinGroup
Join an open group or request membership in a closed group.
📄️ LeaveGroup
Leave as member of a group.
📄️ LeaveGroupAuto
Leave a group in which the user is a member. If member is OWNER, a new owner is automatically selected: most recently active ADMIN; otherwise, most recently active MEMBER; otherwise, group is deleted.
📄️ ListGroupsPage
Retrieve a page of group summary information based on the specified context.
📄️ ListGroupsPageByOffset
Retrieve a page of group summary information based on the encoded context and specified page offset.
📄️ ListGroupsWithMember
Retrieve group summary information about the groups in which the specified user is a member.
📄️ ReadGroup
Retrieve information about the group.
📄️ ReadGroupData
Retrieve a group's data object
📄️ ReadGroupEntitiesPage
Retrieve a page of group entity information based on the specified context. The groupId is required as part of the searchCriteria of the context.
📄️ ReadGroupEntitiesPageByOffset
Retrieve a page of group entity information based on the encoded context and specified page offset.
📄️ ReadGroupEntity
Read an entity in the group.
📄️ ReadGroupMembers
Read the members of the group.
📄️ RejectGroupInvitation
Reject an invitation to become a member of the group.
📄️ RejectGroupJoinRequest
Reject a request to join the group.
📄️ RemoveGroupMember
Remove a member from the group.
📄️ SetGroupOpen
Set whether a group is open (true) or closed (false).
📄️ SysAddGroupMember
Add a user as a member to the group, bypassing ownership/ACL checks. Optional parameters: role OR attributes.
📄️ SysChangeGroupType
Changes the Group Type.
📄️ SysCreateGroup
Create a group.
📄️ SysCreateGroupEntity
Create an entity in the group with no owner. Optional parameters: All except groupId.
📄️ SysDeleteGroup
Delete a group, bypassing ownership/ACL checks.
📄️ SysDeleteGroupEntity
Delete an entity in the group, bypassing ownership/ACL checks
📄️ SysGetRandomGroupsMatching
Gets a list of up to maxReturn randomly selected groups from the server based on the where condition, bypassing ownership/ACL checks.
📄️ SysIncrementGroupData
Partial increment of group data field items. Partial set of items incremented as specified. Bypasses ownership/ACL checks.
📄️ SysIncrementGroupEntityData
Partial increment of group entity data field items. Partial set of items incremented as specified. Bypasses ownership/ACL checks.
📄️ SysIsGroupMember
Verifies if user is a group member and returns information about group member, bypassing ownership/ACL checks.
📄️ SysListGroupsPage
Retrieve a page of group summary information based on the specified context, bypassing ownership/ACL checks.
📄️ SysListGroupsPageByOffset
Retrieve a page of group summary information based on the encoded context and specified page offset, bypassing ownership/ACL checks.
📄️ SysReadGroup
Retrieve information about the group, bypassing ownership/ACL checks.
📄️ SysReadGroupData
Retrieve a group's data object, bypassing ownership/ACL checks.
📄️ SysReadGroupEntitiesPage
Retrieve a page of group entity information based on the specified context, bypassing ownership/ACL checks.
📄️ SysReadGroupEntitiesPageByOffset
Retrieve a page of group entity information based on the encoded context and specified page offset, bypassing ownership/ACL checks.
📄️ SysReadGroupEntity
Read an entity in the group, bypassing ownership/ACL checks.
📄️ SysReadGroupMembers
Read all members in the group, bypassing ownership/ACL checks.
📄️ SysRemoveGroupMember
Remove a member from the group, bypassing group ownership/ACL checks.
📄️ SysSetGroupOpen
Set whether a group is open (true) or closed (false), bypassing ownership/ACL checks.
📄️ SysUpdateGroupAcl
Set a group's access conditions, bypassing ownership/ACL checks.
📄️ SysUpdateGroupData
Update a group's data, bypassing ownership/ACL checks.
📄️ SysUpdateGroupEntityAcl
Update the acl settings for a group entity, bypassing ownership/ACL checks.
📄️ SysUpdateGroupEntityData
Update the data for a group entity, bypassing ownership/ACL checks. Optional parameters: data (will clear data if not provided)
📄️ SysUpdateGroupMember
Update a member of the group.
📄️ SysUpdateGroupName
Update a group's name, bypassing ownership/ACL checks.
📄️ SysUpdateGroupSummaryData
Update a group's summary data, bypassing ownership/ACL checks.
📄️ UpdateGroupAcl
Set a group's access conditions.
📄️ UpdateGroupData
Update a group's data.
📄️ UpdateGroupEntityAcl
Update the acl settings for a group entity, enforcing ownership.
📄️ UpdateGroupEntityData
Update the data for a group entity . Optional parameters: jsonData (will clear data if not provided)
📄️ UpdateGroupMember
Update a member of the group.
📄️ UpdateGroupName
Update a group's name.
📄️ UpdateGroupSummaryData
Update a group's summary data.