UpdateSystemEntityAcl
Method updates the acl of an exisiting system entity on the server.
Service | Operation |
---|---|
globalEntity | UPDATE_SYSTEM_ENTITY_ACL |
Method Parameters
Parameter | Description |
---|---|
entityId | The id of the entity to update. |
version | The version of the entity to update. Use -1 to indicate the newest version. |
acl | The entity's Access Control List as an object. A null ACL implies default permissions which make the entity readable/writeable by only the owner. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var entityId = "the-entity-id";
var version = 2;
var acl = {
"other": 1
};
var globalEntityProxy = bridge.getGlobalEntityServiceProxy();
var postResult = globalEntityProxy.updateSystemEntityAcl(entityId, version, acl);
if (postResult.status == 200) {
// Success!
}
{
"service": "globalEntity",
"operation": "UPDATE_SYSTEM_ENTITY_ACL",
"data": {
"entityId": "the-entity-id",
"version": 2,
"acl": {
"other": 1
}
}
}
JSON Response
{
"data": {
"response": {
"data": {
"gameId": "22232",
"entityIndexedId": null,
"timeToLive": -1,
"createdAt": 1499276273151,
"entityType": "address",
"entityId": "5ae3644f-5306-4b24-8134-29b0c1fdf713",
"acl": {
"other": 2
},
"ownerId": null,
"version": 2,
"expiresAt": 9223372036854776000,
"updatedAt": 1499276316486
},
"status": 200
},
"success": true
},
"status": 200
}