/deleteItems: Delete Items

URL:
https://[root]/content/users/[userName]/deleteItems
Methods:
POST

Example Usage

URL for Delete Items

Use dark colors for code blocksCopy
1
https://www.arcgis.com/sharing/rest/content/users/jsmith/deleteItems?items=93b54c8930ae46d9a00a7820cb3ebbd1,bb8e3d443ab44878ab8315b00b0612ca

Description

Deletes a batch of items owned or administered by the calling user.

For ArcGIS Online organizations, the deletedItems operation moves all the supported items to the recycle bin for 14 days before they are permanently deleted. Any unsupported items in the batch are permanently deleted. Learn more about permanently deleting and restoring items.

Request Parameters

ParameterDetails

[Common Parameters]

For a complete listing, see Common parameters.

items

A comma separated list of items to be deleted.

permanentDelete

Deletes a batch of items permanently. The default is false. Any unsupported items in the batch are permanently deleted even if the value is set to false. This parameter was introduced in the ArcGIS Online June 2024 update.

Values: true | false

Example:

Use dark colors for code blocksCopy
1
https://org.arcgis.com/sharing/rest/content/users/jsmith/deleteItems?items=93b54c8930ae46d9a00a7820cb3ebbd1,bb8e3d443ab44878ab8315b00b0612ca?permanentDelete=true

Response Properties

PropertyDetails

results

An array of JSON objects, one for each item requested. Each object is made up of the itemId and a success flag to indicate if the item was successfully deleted. If an error occurs when deleting an item, an error object is also returned.

JSON Response Syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{"results": [{
  "itemId": "<item  id>",
  "success": true | false,
  "error": {
      "code": code,
      "message": "<error message>"
    }
}]
}

JSON Response Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{"results": [
  {
    "itemId": "93b54c8930ae46d9a00a7820cb3ebbd1",
    "success": true,
  },
  {
    "itemId": "bb8e3d443ab44878ab8315b00b0612ca",
    "success": false,
    "error": {
      "code": 500,
      "message": "Item does not exist or is inaccessible"
    }
  }
]}

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