Skip to main content
Version: 5.7.0

SysIncrementData

tip

This method is not sharding safe - and thus is not recommended for custom entities that you may want to shard for greater performance and scalability in the future. Consider using SysIncrementDataSharded() version of this method instead.

Increments the specified fields by the specified amount within custom entity data on the server, bypassing ownership/ACL permissions checks.

ServiceOperation
customEntitySYS_INCREMENT_DATA

Method Parameters

ParameterDescription
entityTypeThe type of custom entity being updated.
entityIdThe id of custom entity being updated.
fieldsJsonSpecific fields, as JSON, within entity's custom data, with respective increment amount.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"entityId": "aaaa-bbbb-cccc-dddd",
"version": 2,
"acl": {
"other": 2
},
"ownerId": null,
"expiresAt": null,
"timeToLive": null,
"createdAt": 1586047449214,
"updatedAt": 1591290232477,
"data": {
"goals": 3,
"assists": 5
},
"entityType": "athletes"
},
"status": 200
}