- URL:
- https://[root]/content/users/[userName]/canReassignItems
- Methods:
POST
- Version Introduced:
- ArcGIS Enterprise 11.0
Example usage
The following is a sample ArcGIS Enterprise POST request for the can
operation:
POST /webadaptor/sharing/rest/content/users/itemOwner/canReassignItems HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
items=0000737d2de44ea0a275a7fceba4da73&targetUsername=newOwner&f=pjson
Description
The can
operation checks whether the items owned by one user can be successfully reassigned to a specified user before performing the Reassign Items operation. 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
privilege assigned to them to transfer content to another user.
Request parameters
Parameter | Details |
---|---|
| 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:
|
| 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:
If the above requirements are not met, an error response will be returned. Example:
|
| The response format. The default format is Values: |
JSON Response syntax
The response syntax example below demonstrates an error response, returned when the user specified in the target
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>"
},
{
"itemId": "<item id>",
"type": "<item type>",
"url": "<url>",
"reservedTypeKeywords": [
"<reserved type keyword1>"
],
"owner": "<owner>"
}
]
}
}
The response syntax example below demonstrates a success response:
{
"itemId": "<item id>",
"success": true | false
}
JSON Response example
The response example below demonstrates an error response, returned when the user specified in the target
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": "FSowner1"
},
{
"itemId": "bb8e3d443ab44878ab8315b00b0612ca",
"type": "Feature Service",
"url": "https://machine.domain.com/webadaptor/rest/services/FS456/FeatureServer",
"reservedTypeKeywords": [
"Hosted Service"
],
"owner": "FSowner2"
}
]
}
}
The response example below demonstrates a success response:
{
"results": [
{
"itemId": "a56f1cdb2ad54af284549fa5769f709c",
"success": true
}
]
}