DeleteSystemEntity
Method deletes the given system entity on the server.
System entities are entities that can only be deleted via cloudCode, or the brainCloud dashboard. Use them for storing data that the users should not be able to delete.
This method is affected by versioning. See the versioning documentation for more information.
Service | Operation |
---|---|
entity | DELETE |
Method Parameters
Parameter | Description |
---|---|
entityId | The id of the entity to update |
version | The entity's data object. -1 indicates current entity version |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
//cloud code only
//cloud code only
//cloud code only
//cloud code only
//cloud code only
// Cloud Code only. To view example, switch to the Cloud Code tab
var entityId = "a-entity-id";
var version = 2;
var globalEntityProxy = bridge.getGlobalEntityServiceProxy();
var postResult = globalEntityProxy.deleteSystemEntity(entityId, version);
if (postResult.status == 200) {
// Success!
}
{
"service": "entity",
"operation": "DELETE",
"data": {
"entityId": "someEntityId",
"version": -1
}
}
JSON Response
{
"status": 200,
"data": null
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40344 | ENTITY_VERSION_MISMATCH | The version parameter does not match the current version on the server |