- URL:https://[root]/content/users/[userName]/items/[itemID]/canDelete(POST only)
- Version Introduced:10.6.1
Example Usage
URL for Delete Item
https://
<useritem-url>/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/canDelete
Description
Can Delete Item indicates whether an item can be deleted or not. When the returned response from Can Delete Item is true, the item can be deleted. When the returned response is false, the item cannot be deleted due to a variety of reasons. For example, delete protection has been set on the item or it has dependent capabilities.
Request Parameters
Parameter | Details |
---|---|
[Common Parameters] | For a complete listing, see Common parameters. |
Response Properties
Property | Details |
---|---|
itemID | The ID of the queried item. |
success | Indicates if the operation was successful. |
JSON Response Syntax
{
"itemId": "<item id>",
"success": true | false
}
JSON Response Example - item can be deleted
{
"itemId": "e03f626be86946f997c29d6dfc7a9666",
"success": true
}
JSON Response Example - item cannot be deleted as delete protection has been enabled
{
"itemId": "a34c2e6711494e62b3b8d7452d4d6235",
"success": false,
"error": {
"code": 400,
"messageCode": "CONT_0048",
"message": "Unable to delete item. Delete protection is turned on.",
"offendingItems": [
]
}
}
JSON Response Example - item cannot be deleted as it has dependent capabilities
{
"itemId": "e03f626be86946f997c29d6dfc7a9666",
"success": false,
"error": {
"code": 400,
"messageCode": "CONT_00481",
"message": "Unable to delete item. This service item has a related Service item",
"offendingItems": [
{
"itemId": "9fcec52e8c924bd49d56a8f07e4214d5",
"title": "map_wfs",
"type": "WFS"
}
]
}
}