ListCategories

更新时间:
复制 MD 格式

You can use ListCategories to retrieve category information.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

ccc-test

Type

string

No

The category type.

Valid values:

  • Ticket :

    Ticket

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.