- URL:https://[root]/content/updateItems(POST only)
Example Usage
URL for Update Items
https://www.arcgis.com/sharing/rest/content/updateItems
Description
The Update Items operation (POST only) allows item owner and organization administrators who has the portal:admin:updateItems privilege to add or remove organization content categories on items. A maximum of 100 items can be bulk updated per request.
Request Parameters
Parameter | Details |
---|---|
[Common Parameters] | For a complete listing, see Common parameters. |
items | A JSON array of item objects. Each is specified with the item ID that consists of a categories object. categories is specified with an array that lists all content categories to update on the item, each with full hierarchical path prefixed with /. In ArcGIS Online, content category limits are set based on the limits set by the organization. For ArcGIS Enterprise organizations, each item can be categorized to a maximum of 20 categories. Example:
|
Response Properties
Property | Details |
---|---|
results | An array of JSON objects, one for each item requested. Each object is made up of the itemId and a success flag to indicate whether the item was successfully updated. If an error occurs during updating an item, an error object is also returned. Example:
|
JSON Response Syntax
{"results": [
{
"itemId": "<itemId1>",
"success": true | false
},
{
"itemId": "<itemId2>",
"success": true | false,
"error": {
"code": <error code>,
"message": "<error message>"
}
},
{
"itemId": "<itemId3>",
"success": true | false
}
]}
JSON Response Example
{"results": [
{
"itemId": "9ced00fdce3e4b20bb4b05155acbe817",
"success": true
},
{
"itemId": "c3ad4ed8bcf04d619537cfe252a1760d",
"success": false,
"error": {
"code": 400,
"message": "Item exceeds max size of 20 categories."
}
},
{
"itemId": "2678d3002eea4e4a825e3bdf10016e61",
"success": true
}
]}