SysUpdateCollectionOptions
Updates the collection options for the custom collection.
Service | Operation |
---|---|
customEntity | SYS_UPDATE_COLLECTION_OPTIONS |
Method Parameters
Parameter | Description |
---|---|
entityType | The type of the custom entity collection to update. |
collectionOptsJson | The collection options updates, as JSON object. |
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 collectionOptsJson = {
"migrate": true,
"identifier": "playerName"
};
var customEntityProxy = bridge.getCustomEntityServiceProxy();
var postResult = customEntityProxy.sysUpdateCollectionOptions(entityType, collectionOptsJson);
if (postResult.status == 200) {
// Success!
}
{
"service": "customEntity",
"operation": "SYS_UPDATE_COLLECTION_OPTIONS",
"data":
{
"entityType": "athletes",
"collectionOptsJson": {
"migrate": true,
"identifier": "playerName"
}
}
}
JSON Response
{
"data": {
"options": {
"isOwned": false,
"migrate": true,
"identifier": "playerName",
"dataTemplateJson": {
"playerName": "Randy Traywick",
"playerId": 123456,
"teamName": "Super Stars",
"jerseyNum": 44
},
"dataTemplateText": "**Important** notes go here..."
},
"name": "athletes",
"customIndexes": {
"jerseyNum": {
"name": "jerseyNum",
"keysJson": "{\n \"data.jerseyNum\":1\n}",
"optionsJson": "{\"name\":\"jerseyNum\",\"background\":true}",
"options": {
"name": "jerseyNum",
"background": true
}
},
"playerName": {
"name": "playerName",
"keysJson": "{\n \"data.playerName\": \"text\"\n}",
"optionsJson": "{\"name\":\"playerName\",\"background\":true}",
"options": {
"name": "playerName",
"background": true
}
},
"playernameindex": {
"name": "playernameindex",
"keysJson": "{\"data.playerName\":1.0}",
"optionsJson": "{\"name\":\"playernameindex\",\"background\":true}",
"options": {
"name": "playernameindex",
"background": true
}
}
}
},
"status": 200
}