/moveItems: Move Items

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

Example usage

The following is a sample ArcGIS Online POST request for the moveItems operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /sharing/rest/content/users/jSmith/moveItems HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

items=93b54c8930ae46d9a00a7820cb3ebbd1,bb8e3d443ab44878ab8315b00b0612ca&folder=1a9ad803da604628b08c968ce602a231&f=pjson

The following is a sample ArcGIS Enterprise POST request for the moveItems operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /<context>/sharing/rest/content/users/jSmith/moveItems HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

items=93b54c8930ae46d9a00a7820cb3ebbd1,bb8e3d443ab44878ab8315b00b0612ca&folder=1a9ad803da604628b08c968ce602a231&f=pjson

Description

The moveItems operation moves a batch of items from their current folder to the specified target folder.

Request parameters

ParameterDetails

items

A comma-separated list of items to be moved.

folder

The destination folder for the items. If the items are to be moved to the root folder, specify the value as "/" (forward slash).

f

The response format. The default response format is html.

Values: html | json | pjson

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 moved. If an error occurred in moving 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
10
11
12
{
  "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
15
16
{
  "results": [
    {
      "itemId": "93b54c8930ae46d9a00a7820cb3ebbd1",
      "success": true,
    },
    {
      "itemId": "bb8e3d443ab44878ab8315b00b0612ca",
      "success": false,
      "error": {
        "code": 500,
        "message": "Item already exists in target folder"
      }
    }
  ]
}

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