- URL:
- https://[root]/community/groups/[groupID]/assignCategorySchema
- Methods:
POST
- Version Introduced:
- ArcGIS Enterprise 10.6.1 | ArcGIS Online April 2018
Example usage
The following is a sample ArcGIS Online POST request for the assign
operation:
POST /sharing/rest/community/groups/826ab72ed44c48beb8735c2634e0bfad/assignCategorySchema HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
categorySchema={"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"}]}]}]}&f=pjson
The following is a sample ArcGIS Enterprise POST request for the assign
operation:
POST /webadaptor/sharing/rest/community/groups/826ab72ed44c48beb8735c2634e0bfad/assignCategorySchema HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
categorySchema={"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"}]}]}]}&f=pjson
Description
The assign
operation allows group owners or managers to set up content categories for a group. Content categories are hierarchical sets of classes to help organize and browse group content. Each group can have a maximum of five category trees, and each category schema can have up to four hierarchical levels, including the category tree. The maximum number of categories and subcategories a group can have is 200. Each category must have a title with fewer than 100 characters and a description with fewer than 300 characters.
Request parameters
Parameter | Details |
---|---|
| A Example, formatted for readability
|
| The response format. The default response format is Values: |
Response properties
Property | Details |
---|---|
| Indicates whether the operation was successful. |
Additional example usage
Example 1: Single category tree
The following JSON object outlines a single category tree, Categories
, and its three second-level child categories:Basemaps
, Imagery
, and Region
. Each second-level category has multiple subcategories that are used to fine-tune broader category ideas.
{
"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"
}
]
}
]
}
]
}
The following is a sample POST request for ArcGIS Enterprise using the JSON example above:
POST /webadaptor/sharing/rest/community/groups/826ab72ed44c48beb8735c2634e0bfad/assignCategorySchema HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
categorySchema={"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"}]}]}]}&f=pjson
Example 2: Multiple category trees
The following JSON object outlines three separate content category trees—Categories
, Region
, and Services
—and their various subcategories:
{
"categorySchema": [
{
"title": "Categories",
"categories": [
{
"title": "Basemaps",
"categories": [
{
"title": "Partner Basemap"
},
{
"title": "Esri Basemaps",
"categories": [
{
"title": "Esri Raster Basemap"
},
{
"title": "Esri Vector Basemap"
}
]
}
]
}
]
},
{
"title": "Region",
"categories": [
{
"title": "US"
},
{
"title": "World"
}
]
},
{
"title": "Services",
"categories": [
{
"title": "Feature Services"
},
{
"title": "Map Services"
}
]
}
]
}
The following is a sample POST request for ArcGIS Enterprise using the JSON example above:
POST /webadaptor/sharing/rest/community/groups/826ab72ed44c48beb8735c2634e0bfad/assignCategorySchema HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
categorySchema={"categorySchema": [{"title": "Categories","categories": [{"title": "Basemaps","categories": [{"title": "Partner Basemap"},{"title": "Esri Basemaps","categories": [{"title": "Esri Raster Basemap"},{"title": "Esri Vector Basemap"}]}]}]},{"title": "Region","categories": [{"title": "US"},{"title": "World"}]},{"title": "Services","categories": [{"title": "Feature Services"},{"title": "Map Services"}]}]}&f=pjson
JSON Response example
The following response is returned when assign
is performed successfully:
{"success": true}
The following error message is returned when more than five content category trees are included in the JSON object:
{
"error": {
"code": 400,
"messageCode": "ORG_1132",
"message": "Unable to assign category schema.",
"details": ["Category schema exceeds max tree size or empty."]
}
}
The following error message is returned when the JSON object has incorrect syntax:
{
"error": {
"code": 400,
"messageCode": "ORG_1132",
"message": "Unable to assign category schema.",
"details": ["Invalid category schema."]
}
}