Skip To Content

/reassignItems: Reassign Items

  • URL:https://[root]/content/users/[userName]/reassignItems(POST only)
  • Version Introduced:ArcGIS Enterprise 11.0

Example usage

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


POST /webadaptor/sharing/rest/content/users/itemOwner/reassignItems HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

items=0000737d2de44ea0a275a7fceba4da73&targetUsername=newOwner&targetFoldername=cityPlanning

Description

The reassignItems operation reassigns items owned by one user to another user in the organization. Before performing this operation, it is recommended that you first determine whether the user is eligible to receive content. Users assigned the default administrator role, or a custom role with administrative privileges, can perform this operation. The item owner can also use this operation; if the item owner that performs this operation is not a default administrator, or assigned a custom role with administrative privileges, they must have the portal:user:reassignItems privilege assigned to them to transfer content to another user.

Nota:
If any of the items that are being reassigned have a private sharing level, the receiving member must have sharing access to all groups which those items are currently shared to.

Request parameters

ParameterDetails
items

(Required)

A comma-separated list of item IDs that will have their ownership transferred. The maximum number of items that can be transferred at one time is 100.

Example

items=0000737d2de44ea0a275a7fceba4da73
targetUsername

(Required)

The username of the user the items will be reassigned to. For a user to be eligible to receive transferred content, they must meet the following requirements:

  • The user must be assigned the portal:user:receiveItems privilege to receive the transferred content.
  • The user must have a user type that allows them to own content. To learn more about user types, see the User types, roles, and privileges topic.
  • If the items being transferred to the user are shared with a group, the user receiving the items must be a member of the group. If the group is a view-only group, the user receiving the items must be the group owner or a group manager.

If the above requirements are not met, an error response will be returned.

Example

targetUsername=newOwner
targetFoldername

(Optional)

The folder name the transferred items will be sent to. By default, if no folder is specified, the transferred items will be sent to a folder with the following format in which [username] represents the name of the original item owner, and yyyy_mm_dd represents the date the transfer occurred:

[username]_yyyy_mm_dd

If the folder specified does not exist, it will be created when item ownership is transferred.

Example

targetFoldername=cityPlanning
f

The response format. The default format is html.

Values: html | json | pjson

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:


{
  "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:


{
  "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:


{
  "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:


{
  "success": true,
  "itemId": "b512083cd1b64e2da1d3f66dbb135956"
}