- URL:
- https://[root]/content/users/[userName]/items/[itemID]/canDelete
- Methods:
POST- Version Introduced:
- ArcGIS Enterprise 10.6.1
Example Usage
URL for Delete Item
https:///sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/canDeleteDescription
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 |
|---|---|
| For a complete listing, see Common parameters. |
Response Properties
| Property | Details |
|---|---|
| The ID of the queried item. |
| Indicates if the operation was successful. |
JSON Response eyntax
{
"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"
}
]
}
}