You can use ListCategories to retrieve category information.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
ccc-test |
| Type |
string |
No |
The category type. Valid values:
|
Ticket |
| CategoryId |
string |
No |
The ID of the ticket category. Specify this parameter to return information about the subcategories of the specified category. If you leave this parameter empty, information about all categories in the instance is returned. |
43c2671b-***-***-86d0-6bd187905cc8 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
ListCategoriesResponse |
||
| Data |
string |
The data. The category node information, in the format of a JSON string. |
[{\"categoryId\":\"43c2671b-8939-4223-****-6bd187905cc8\",\"childCategoryList\":[{\"categoryId\":\"120816ad-4392-4edf-****-6d053d5cfa5a\",\"childCategoryList\":[],\"deleted\":0,\"editor\":\"283277706217028904\",\"editorName\":\"283277706217028904\",\"instanceId\":\"cccV2-kmz\",\"itemCount\":0,\"level\":2,\"name\":\"客户反馈\",\"parentCategoryId\":\"43c2671b-8939-****-86d0-6bd187905cc8\",\"type\":\"Ticket\"}],\"deleted\":0,\"editor\":\"283277706217028904\",\"editorName\":\"283277706217028904\",\"instanceId\":\"cccV2-kmz\",\"itemCount\":10,\"level\":1,\"name\":\"测试一01类目\",\"type\":\"Ticket\"},{\"categoryId\":\"4948fcd0-2972-****-81c6-1a00927e1802\",\"childCategoryList\":[],\"deleted\":0,\"editor\":\"283277706217028904\",\"editorName\":\"283277706217028904\",\"instanceId\":\"cccV2-kmz\",\"itemCount\":0,\"level\":1,\"name\":\"生产环境验证\",\"type\":\"Ticket\"},{\"categoryId\":\"c426bd7f-9661-47c3-****-2508f1a32f66\",\"childCategoryList\":[],\"deleted\":0,\"editor\":\"269801834095770945\",\"editorName\":\"269801834095770945\",\"instanceId\":\"cccV2-kmz\",\"itemCount\":4,\"level\":1,\"name\":\"测试环境测试\",\"type\":\"Ticket\"}] |
| RequestId |
string |
The request ID. |
DE803553-8AA9-4B9D-9E4E-A82BC69EDCEE |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Code |
string |
The response code. |
OK |
| Message |
string |
The response message. |
无 |
| Params |
array |
The list of incorrect parameters. |
|
|
string |
The incorrect parameter. |
无 |
Examples
Success response
JSON format
{
"Data": "[{\\\"categoryId\\\":\\\"43c2671b-8939-4223-****-6bd187905cc8\\\",\\\"childCategoryList\\\":[{\\\"categoryId\\\":\\\"120816ad-4392-4edf-****-6d053d5cfa5a\\\",\\\"childCategoryList\\\":[],\\\"deleted\\\":0,\\\"editor\\\":\\\"283277706217028904\\\",\\\"editorName\\\":\\\"283277706217028904\\\",\\\"instanceId\\\":\\\"cccV2-kmz\\\",\\\"itemCount\\\":0,\\\"level\\\":2,\\\"name\\\":\\\"客户反馈\\\",\\\"parentCategoryId\\\":\\\"43c2671b-8939-****-86d0-6bd187905cc8\\\",\\\"type\\\":\\\"Ticket\\\"}],\\\"deleted\\\":0,\\\"editor\\\":\\\"283277706217028904\\\",\\\"editorName\\\":\\\"283277706217028904\\\",\\\"instanceId\\\":\\\"cccV2-kmz\\\",\\\"itemCount\\\":10,\\\"level\\\":1,\\\"name\\\":\\\"测试一01类目\\\",\\\"type\\\":\\\"Ticket\\\"},{\\\"categoryId\\\":\\\"4948fcd0-2972-****-81c6-1a00927e1802\\\",\\\"childCategoryList\\\":[],\\\"deleted\\\":0,\\\"editor\\\":\\\"283277706217028904\\\",\\\"editorName\\\":\\\"283277706217028904\\\",\\\"instanceId\\\":\\\"cccV2-kmz\\\",\\\"itemCount\\\":0,\\\"level\\\":1,\\\"name\\\":\\\"生产环境验证\\\",\\\"type\\\":\\\"Ticket\\\"},{\\\"categoryId\\\":\\\"c426bd7f-9661-47c3-****-2508f1a32f66\\\",\\\"childCategoryList\\\":[],\\\"deleted\\\":0,\\\"editor\\\":\\\"269801834095770945\\\",\\\"editorName\\\":\\\"269801834095770945\\\",\\\"instanceId\\\":\\\"cccV2-kmz\\\",\\\"itemCount\\\":4,\\\"level\\\":1,\\\"name\\\":\\\"测试环境测试\\\",\\\"type\\\":\\\"Ticket\\\"}]",
"RequestId": "DE803553-8AA9-4B9D-9E4E-A82BC69EDCEE",
"HttpStatusCode": 200,
"Code": "OK",
"Message": "无",
"Params": [
"无"
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | NotExists.InstanceId | The specified instance %s does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.