SysUpdateEntityOwner
Updates the owner of the specified custom entity.
Service | Operation |
---|---|
customEntity | SYS_UPDATE_ENTITY_OWNER |
Method Parameters
Parameter | Description |
---|---|
entityType | The type of custom entity being updated. |
entityId | The id of custom entity being updated. |
oldOwnerId | The profileId of the existing owner of the entity. |
newOwnerId | The profileId of the new owner of the entity. |
version | Version of the custom entity being updated. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var entityType = "athletes";
var entityId = "aaaa-bbbb-cccc-dddd";
var oldProfileId = "www-xxx-yyy-zzz1";
var newProfileId = "www-xxx-yyy-zzz2";
var version = 1;
var customEntityProxy = bridge.getCustomEntityServiceProxy();
var postResult = customEntityProxy.sysUpdateEntityOwner(entityType, entityId, oldProfileId, newProfileId, version);
if (postResult.status == 200) {
// Success!
}
{
"service": "customEntity",
"operation": "SYS_UPDATE_ENTITY_OWNER",
"data": {
"entityType": "athletes",
"entityId": "aaaa-bbbb-cccc-dddd",
"oldOwnerId": "www-xxx-yyy-zzz1",
"newOwnerId": "www-xxx-yyy-zzz2",
"version": 1
}
}
JSON Response
{
"status": 200,
"data": {
"entityId": "1497cc7e-66cb-4682-9eac-c755523369a8",
"version": 2,
"acl": {
"other": 1
},
"ownerId": "www-xxx-yyy-zzz2",
"expiresAt": null,
"timeToLive": null,
"createdAt": 1573540122600,
"updatedAt": 1573540142928
}
}