- URL:
- https://[root]/content/users/[userName]/shareItems
- Methods:
POST
Example Usage
URL for Share Items
https://www.arcgis.com/sharing/rest/content/users/jsmith/shareItems
everyone: false
items=93b54c8930ae46d9a00a7820cb3ebbd1,bb8e3d443ab44878ab8315b00b0612ca
groups=4774c1c2b79046f285b2e86e5a20319e,cc5f73ab367544d6b954d82cc9c6dab7
Description
Shares a batch of items with the specified list of groups (POST only). Users can only share items with groups to which they belong. This operation also allows a user to share items with everyone
, in which case the items are publicly accessible, or with everyone in their organization.
Request Parameters
Parameter | Details |
---|---|
| For a complete listing, see Common parameters. |
| If |
| If |
| A comma-separated list of items to be shared. |
| A comma-separated list of group IDs with which the items will be shared. |
| Set to |
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 ID1>",
"success": true | false,
"notSharedWith": [
<groups not able to share the item with>
],
"error": {
"code": <error code>,
"message": "<error message>"
}
},
{
"itemId": "<item ID2>",
"success": true | false,
"notSharedWith": [
<groups not able to share the item with>
]
}
]
}
JSON Response Example
{
"results": [
{
"itemId": "3fbb6f64dd3c41da8a5f9dd4be11a9fe",
"success": false,
"notSharedWith": [
],
"error": {
"code": 500,
"message": "Item does not exist or is inaccessible"
}
},
{
"itemId": "07efda2ec8934d0cab3b68018758701a",
"success": true,
"notSharedWith": [
]
}
]
}