- URL:
- https://[root]/content/users/[userName]/items/[itemID]/share
- Methods:
- POST
Example usage
The following is a sample ArcGIS Online POST request for the share operation:
POST /sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/share HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
everyone=false&org=true&groups=4774c1c2b79046f285b2e86e5a20319e,cc5f73ab367544d6b954d82cc9c6dab7&f=pjsonThe following is a sample ArcGIS Enterprise POST request for the share operation:
POST /<context>/sharing/rest/content/users/jsmith/items/b512083cd1b64e2da1d3f66dbb135956/share HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
everyone=false&org=true&groups=4774c1c2b79046f285b2e86e5a20319e,cc5f73ab367544d6b954d82cc9c6dab7&f=pjsonDescription
The share operation shares an item with a set of specific groups that the user belongs to. This operation is available to the item owner and organization administrators, who may share an item to a group on the owner's behalf.
An item can have one of four sharing levels, represented in the access property of the item:
- private: the item is only accessible to the item owner
- public: the item is publically accessible to users outside of the owner's organization
- org: the item is accessible to all users within the same organization
- groups: the item is shared to one or more groups
This operation does not have any restrictions if the shared item has the public or org sharing level. Items with a private sharing level can only be shared to groups the item owner has sharing access to.
Request parameters
| Parameter | Details | 
|---|---|
| 
 | For a complete listing, see Common parameters. | 
| 
 | If  Values:  | 
| 
 | If  Values:  | 
| 
 | A comma-separated list of group IDs with which the item will be shared. To make an item private, keep this parameter empty in the request. Example  | 
| 
 | Set to  Values:  | 
Response properties
| Property | Details | 
|---|---|
| 
 | Array of groups with which the item could not be shared. | 
| 
 | ID of the item being shared. | 
JSON Response syntax
{
  "notSharedWith": [<groups not able to share with>],
  "itemId": "<item id>"
}JSON Response example
{
  "notSharedWith": ["cc5f73ab367544d6b954d82cc9c6dab7"],
  "itemId": "b512083cd1b64e2da1d3f66dbb135956"
}