ArcGIS REST API

Assign Category Schema

Description

The Assign Category Schema operation (POST only) allows organization administrators to set up content categories for organization that is a hierarchical set of classes to help organize and browse items.

An organization can have a max of 5 category trees with each category schema can have up to 4 hierarchical levels. The maximum number of categories an organization can have in total is 200 with each category of less than 100 characters title and 300 characters description.

The operation is available to both Esri default administrators and custom roles with the portal:admin:updateItemCategorySchema privilege.

Request Parameters

ParameterDetails
[Common Parameters]

For a complete listing, see common parameters.

categorySchema

A categorySchema object that consists of an array of JSON objects representing top level categories. Each object has title, description and categories properties where categories consists of an array of objects with each having the same properties and represents the descendant categories or subcategories and so on.

Example:

{
	"categorySchema": [{
		"title": "Categories",
		"categories": [{
			"title": "Basemaps",
			"categories": [{
				"title": "Partner Basemap"
			}, {
				"title": "Esri Basemaps",
				"categories": [{
					"title": "Esri Raster Basemap"
				}, {
					"title": "Esri Vector Basemap"
				}]
			}]
		}, {
			"title": "Imagery",
			"categories": [{
				"title": "Multispectral Imagery"
			}, {
				"title": "Temporal Imagery"
			}]
		}]
	}, {
		"title": "Region",
		"categories": [{
			"title": "US"
		}, {
			"title": "World"
		}]
	}]
}

Response Properties

PropertyDetails
success

Indicates if the operation was successful.

Example Usage

URL for Assign Category Schema

https://www.arcgis.com/sharing/rest/portals/J423vH8fR9HV444k/assignCategorySchema

JSON Response Syntax

{
"success": true
}

JSON Response Example

{
"success": true
}

or

{"error": {
 "code": 400,
 "messageCode": "ORG_1132",
 "message": "Unable to assign category schema.",
 "details": ["Category schema exceeds max tree size or empty."]
}}