/canReassignItems: Can Reassign Items

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 canReassignItems operation:

1
2
3
4
5
6
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 canReassignItems 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:user:reassignItems privilege assigned to them to transfer content to another user.

Request parameters

ParameterDetails

items

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:

1
items=0000737d2de44ea0a275a7fceba4da73

targetUsername

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:

1
targetUsername=newOwner

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "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:

1
2
3
4
{
  "itemId": "<item id>",
  "success": true | false
}

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "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:

1
2
3
4
5
6
7
8
{
  "results": [
    {
      "itemId": "a56f1cdb2ad54af284549fa5769f709c",
      "success": true
    }
  ]
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close