List categories in the current Workspace. Filter by type, name, parent category, or connector ID.
Prerequisites
You have an Alibaba Cloud Model Studio API key (see the API Key page in the console) and authentication configured. For details, see RAG API overview and Authentication. Data import endpoints use the same base URL and authentication as other RAG APIs, with the path prefix /api/v1/connector/dash/.
Endpoint
POST /api/v1/connector/dash/listCategory
List categories in the current Workspace. Filter by type, name, parent category, or connector ID.
Request body
| Field | Required | Type | Description |
|---|---|---|---|
type | Yes | string | Category type. Only UNSTRUCTURED (unstructured data category) is supported. |
parentId | No | string | Parent category ID. Use to query child categories. |
categoryName | No | string | Category name. Exact match. |
connectorId | No | string | Connector ID. Filter categories by connector. |
nextToken | No | string | Pagination cursor. Omit it on the first request; on subsequent requests pass the nextToken value returned by the previous page. |
maxResult | No | integer | Number of categories returned per page. Defaults to 20. Note the parameter name is maxResult (singular); maxResults (plural) is silently ignored. |
Request example
BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com ({workspace_id} is the Workspace ID), and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.
Response example
Returns 200 on success.
Response fields
| Field | Type | Description |
|---|---|---|
code | string | Response code. Success on success. |
message | string | Error or informational message; an empty string on success. |
requestId | string | Unique request identifier. Include this ID when reporting an issue. |
data | object | Query result. Sub-fields: categoryList (array<object>, category list. Each element is an object with fields: categoryId (string, category ID), categoryName (string, category name), type (string, category type; only UNSTRUCTURED), isDefault (boolean, whether this is the default category)), hasNext (boolean, whether more pages are available), maxResult (integer, page size used for this request), totalCount (integer, total number of matching items). |
status | integer | Business status code. 200 on success, 400 for failures such as invalid parameters. Note that the HTTP status code remains 200 even on failure, so rely on this field and code to determine the result. |
Error codes
| HTTP status code | Error code code | Description |
|---|---|---|
| 400 | InvalidParameter | Invalid request parameters. Example message: Required parameter missing or invalid. |
| 401 | InvalidApiKey | Authentication failed; the API key is invalid or missing. Example message: Invalid API-key provided. |
status and code in the response body to determine the result.