Skip to main content
Version: 5.7.0

SysIncrementDataSharded

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

ServiceOperation
customEntitySYS_INCREMENT_DATA_SHARDED

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.
shardKeyJsonThe shard key field(s) and value(s), as JSON, applicable to the entity being updated. If entity is owned, ownerId must be specified in the shardKeyJson info; otherwise, shardKeyJson must indicate values for all fields in the applicable shard key index.

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"timeToLive": null,
"createdAt": 1659108750204,
"data": {
"goals": 6,
"assists": 10
},
"entityType": "athletes3",
"entityId": "d40569f4-c3b6-4d9e-89b2-ad5dbe4ba580",
"acl": {
"other": 2
},
"ownerId": "b015eabb-b0e2-42fb-9ad2-76aa2d7492f8",
"version": 2,
"expiresAt": null,
"updatedAt": 1659986804804
},
"status": 200
}