Skip to main content
Version: 5.7.0

CreateGroupEntity

Create an entity in the group. Optional parameters: entityType, acl and jsonData

ServiceOperation
groupCREATE_GROUP_ENTITY

Method Parameters

ParameterDescription
groupIdID of the group
entityTypeType of the group entity
isOwnedByGroupMembertrue if entity is owned by a member; false if owned by the entire group
aclAccess control list for the group entity
jsonDataCustom application data

Usage

http://localhost:3000
string groupId = "a-group-id";
string entityType = "myEntityType";
bool isOwnedByGroupMember = false;
GroupACL.Access memberAccess = GroupACL.Access.ReadWrite;
GroupACL.Access otherAccess = GroupACL.Access.None;
GroupACL acl = new GroupACL(otherAccess, memberAccess);
string jsonData = "{\"aKey\":\"aValue\"}";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.Group.CreateGroupEntity(groupId, entityType, isOwnedByGroupMember, acl, jsonData, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"gameId": "20595",
"groupId": "fee55a37-5e86-43e8-942e-06bcbe1b701e",
"entityId": "91cfece7-debb-4698-ba6b-cd2cb432458d",
"ownerId": null,
"entityType": "BLUE",
"createdAt": 1462812680359,
"updatedAt": 1462812680359,
"version": 1,
"data": {},
"acl": {
"member": 2,
"other": 1
}
}
}