/canRestore: Can Restore

URL:
https://<root>/content/users/[userName]/items/[itemID]/canRestore
Methods:
GET
Version Introduced:
ArcGIS Online June 2024

Example Usage

URL for Can Restore

Use dark colors for code blocksCopy
1
https://org.arcgis.com/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/canRestore?f=json

Description

The canRestore operation indicates whether an item can be restored from the recycle bin or not.

If the returned response from canRestore is true, this means that the item can be restored from the recycle bin. If false, the item is dependent on another item in the recycle bin which is preventing restore. The error response will return the item which is blocking restore in the offendingItems field. canRestore will return false until the source item is restored first.

Request parameters

ParameterDetails

[Common Parameters]

For a complete listing, see Common parameters.

Response Properties

PropertyDetails

itemID

The ID of the queried item.

success

Indicates if the operation was successful.

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
{
  "itemId": "<item id>",
  "success": true | false
}

JSON Response example

The item can be restored from the recycle bin:

Use dark colors for code blocksCopy
1
2
3
4
{
  "itemId": "e03f626be86946f997c29d6dfc7a9666",
  "success": true
}

The item cannot be restored from the recycle bin:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "itemId": "a34c2e6711494e62b3b8d7452d4d6235",
  "success": false,
  "error": {
    "code": 400,
    "messageCode": "CONT_00486",
    "message": "Unable to restore item. This service item has a required related Service item in recycle bin.",
    "offendingItems": [
    {
        "itemId": "fb3ca29eaf28498dbdff2385b26d9c85",
        "title": "feature service vehicle populattion",
        "type": "Feature Service"
    }
    ]
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.