Creates a category.
Operation description
You can create at most three levels of categories. Each category level can contain a maximum of 100 subcategories.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:AddCategory |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CateName |
string |
Yes |
The category name.
|
Third-level subcategory |
| ParentId |
integer |
No |
The ID of the parent category. |
5 |
| Type |
string |
No |
The type of the category. Valid values:
|
default |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
****63E8B7C7-4812-46AD-0FA56029AC86**** |
| Category |
object |
The information about the category. |
|
| Type |
string |
The type of the category. Valid values:
|
default |
| ParentId |
integer |
The ID of the parent category. By default, if ParentId is left empty or less than 1, -1 is returned, which indicates that the created category is the root directory. |
-1 |
| CateName |
string |
The category name. |
Category 1 |
| CateId |
integer |
The ID of the created category. |
45 |
| Level |
integer |
The level of the category. A value of 0 indicates a level-1 category, a value of 1 indicates a level-2 category, and a value of 2 indicates a level-3 category. |
0 |
Examples
Success response
JSON format
{
"RequestId": "****63E8B7C7-4812-46AD-0FA56029AC86****",
"Category": {
"Type": "default",
"ParentId": -1,
"CateName": "Category 1",
"CateId": 45,
"Level": 0
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.