- URL:
- https://[root]/content/users/[userName]/unshareItems
- Methods:
- POST
Example Usage
The following is a sample ArcGIS Online POST request for the unshare operation:
POST /sharing/rest/content/users/jsmith/unshareItems HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
items=93b54c8930ae46d9a00a7820cb3ebbd1,bb8e3d443ab44878ab8315b00b0612ca&groups=4774c1c2b79046f285b2e86e5a20319e,cc5f73ab367544d6b954d82cc9c6dab7&f=pjsonThe following is a sample ArcGIS Enterprise POST request for the unshare operation:
POST /<context>/sharing/rest/content/users/jsmith/unshareItems HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
items=93b54c8930ae46d9a00a7820cb3ebbd1,bb8e3d443ab44878ab8315b00b0612ca&groups=4774c1c2b79046f285b2e86e5a20319e,cc5f73ab367544d6b954d82cc9c6dab7&f=pjsonDescription
The unshare operation unshares a batch of items with the specified list of groups.
Users assigned either the default administrator role, or a custom role with administrative privileges, may unshare items on behalf of the owner.
Request Parameters
| Parameter | Details | 
|---|---|
| 
 | A comma-separated list of items to be unshared. | 
| 
 | A comma-separated list of group IDs that should not share the items. | 
| 
 | The response format. The default format is  Values:  | 
Response Properties
| Property | Details | 
|---|---|
| 
 | An array of JSON objects, one for each item requested. Each object consists of the  | 
JSON Response Syntax
{
  "results": [
    {
      "itemId": "<item id>",
      "success": true | false,
      "notUnsharedFrom": [<groups not able to share with>],
      "error": {
        "code": code,
        "message": "<error message>"
      }
    }
  ]
}JSON Response Example
{
  "results": [
    {
      "itemId": "93b54c8930ae46d9a00a7820cb3ebbd1",
      "success": true,
      "notUnsharedFrom": [],
    },
    {
      "itemId": "bb8e3d443ab44878ab8315b00b0612ca",
      "success": false,
      "notUnsharedFrom": [],
      "error": {
        "code": 500,
        "message": "Item does not exist or is inaccessible"
      }
    }
  ]
}