/restore: Restore

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

Example Usage

URL for Restore

Use dark colors for code blocksCopy
1
https://org.arcgis.com/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/restore?folder=0bffc1c3fe984a17bd9ae705b3ca7e22

Description

The restore operation is used to restore an item from the recycle bin to a specified folder. If a folder was not specified by the user, the item will be restored to the user's root folder.

Request parameters

ParameterDetails

[Common Parameters]

For a complete listing, see Common parameters.

folder

Restores an item from the recycle bin to a specified folder.

Example:

Use dark colors for code blocksCopy
1
https://org.arcgis.com/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/restore?folder=0bffc1c3fe984a17bd9ae705b3ca7e22

JSON Response syntax

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

JSON Response example

The item is successfully restored:

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
{
  "itemId": "a34c2e6711494e62b3b8d7452d4d6235",
  "success": false,
  "error": {
    "code": 500,
    "messageCode": "CONT_0295",
    "message": "Unable to restore item: fb3ca29eaf28498dbdff2385b26d9c85.",
    "details": [
          "Unable to restore item from recycle bin: fb3ca29eaf28498dbdff2385b26d9c85"
    ]
  }
}

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