UpdateSystemEntity
Method updates the data of an exisiting system entity on the server.
Service | Operation |
---|---|
globalEntity | UPDATE_SYSTEM_ENTITY |
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. |
data | The entity's data object. |
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 = 1;
var data = {
"street": "1309 Carling"
};
var globalEntityProxy = bridge.getGlobalEntityServiceProxy();
var postResult = globalEntityProxy.updateSystemEntity(entityId, version, data);
if (postResult.status == 200) {
// Success!
}
{
"service": "globalEntity",
"operation": "UPDATE_SYSTEM_ENTITY",
"data": {
"entityId": "the-entity-id",
"version": 1,
"data": {
"street": "1309 Carling"
}
}
}
JSON Response
{
"data": {
"response": {
"data": {
"gameId": "22198",
"entityIndexedId": null,
"timeToLive": 0,
"createdAt": 1498850247510,
"entityType": "address",
"entityId": "4b2f1cba-cc52-4d3c-8663-ff540ee48a38",
"acl": {
"other": 2
},
"ownerId": null,
"version": 2,
"expiresAt": 9223372036854776000,
"updatedAt": 1498850536733
},
"status": 200
},
"success": true
},
"status": 200
}