- URL:
- https://<root>/content/users/[userName]/items/[itemID]/canRecycle
- Methods:
GET
- Version Introduced:
- ArcGIS Online June 2024
Example Usage
URL for Can Recycle Item
https://org.arcgis.com/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/canRecycle?f=json
Description
The can
operation indicates whether an item is supported by the recycle bin or not. This operation is only supported in ArcGIS Online organizations.
If the returned response from can
is true
, this means that the item is supported by the recycle bin. A false
response is returned if an item is either not supported by the recycle bin or the item cannot be recycled due to dependencies. The error response will show a list of offending
that are dependent on the item that the user is trying to recycle. can
will return false
until all dependent items on the offending
list are recycled or permanently deleted.
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 syntax
{
"itemId": "<item id>",
"success": true | false
}
JSON Response example
Item is supported by the recycle bin:
{
"itemId": "e03f626be86946f997c29d6dfc7a9666",
"success": true
}
Item is not supported by the recycle bin:
{
"itemId": "a34c2e6711494e62b3b8d7452d4d6235",
"success": false,
"error": {
"code": 400,
"messageCode": "CONT_0298",
"message": "Unable to recycle item a34c2e6711494e62b3b8d7452d4d6235. Item is part of an unsupported relationship type or item type.",
"offendingItems": [
]
}
}
Item cannot be recycled due to dependencies:
{
"itemId": "a34c2e6711494e62b3b8d7452d4d6235",
"error": {
"code": 400,
"messageCode": "CONT_00481",
"message": "Unable to delete item. This service item has a related Service item",
"offendingItems": [
{
"itemId": "e03f626be86946f997c29d6dfc7a9666",
"title": "Countries_WFS",
"type": "WFS"
},
{
"itemId": "ea433f31f1bd4d6787cf6a82b0a8a7a5",
"title": "WorldMap_OGC",
"type": "OGCFeatureServer"
}
]
},
"success": false
}