/reassign: Reassign Item

URL:
https://[root]/content/users/[userName]/items/[itemID]/reassign
Methods:
POST

Example usage

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

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

targetUsername=swilson&targetFolderName=County Maps&f=pjson

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

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /webadaptor/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/reassign HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

targetUsername=swilson&targetFolderName=County Maps&f=pjson

Description

The reassign operation allows the administrator of an organization to reassign a member's item to another member of the organization.

Request parameters

ParameterDetails

[Common Parameters]

For a complete listing, see Common parameters.

targetUsername

The target username of the new owner of the item.

Example:

Use dark colors for code blocksCopy
1
targetUsername=organization_username1

targetFolderName

The destination folder for the item. If the item is to be moved to the root folder, specify the value as "/" (forward slash). If the target folder doesn't exist, it will be created automatically.

Example:

Use dark colors for code blocksCopy
1
targetFolderName=folder1

Response properties

PropertyDetails

success

Indicates if the operation was successful.

itemId

The ID of the reassigned item.

JSON Response syntax

The response syntax example below demonstrates an error response, returned when the user specified in the targetUsername parameter does not have the proper permissions to be reassigned an item:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "error": {
    "code": <error code>,
    "messageCode": "<error message code>",
    "message": "<error message>",
    "details": [
      {
        "itemId": "<item id>",
        "type": "<item type>",
        "url": "<url>",
	       "reservedTypeKeywords": [
          "<reserved type keyword1>"
        ],
        "owner": "<owner>"
      }
    ]
  }
}

The response syntax example below demonstrates a success response:

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

JSON Response example

The response example below demonstrates an error response, returned when the user specified in the targetUsername parameter does not have the proper permissions to be reassigned an item:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "error": {
    "code": 403,
    "messageCode": "CONT_0291",
    "message": "Unable to reassign item, Target user does not have right privileges.",
    "details":[
      {
        "itemId": "07efda2ec8934d0cab3b68018758701a",
        "type": "Feature Service",
        "url": "https://machine.domain.com/webadaptor/rest/services/FS123/FeatureServer",
        "reservedTypeKeywords":[
          "Hosted Service"
        ],
	       "owner": "FSowner"
      }
    ]
  }
}

The response example below demonstrates a success response:

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

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