Skip to main content
数据导入

新增类目

在当前业务空间下创建新的类目

POST
/api/v1/connector/dash/addCategory
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/connector/dash/addCategory" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "categoryName": "产品文档",
    "categoryType": "UNSTRUCTURED"
  }'
{
  "code": "Success",
  "message": "",
  "messageUnmodified": false,
  "requestId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "data": {
    "categoryId": "cate_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxx",
    "categoryName": "_tmp_example"
  },
  "status": 200
}

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面(https://rag.console.aliyun.com/settings/apikey)获取。

Body

application/json
string
required

类目名称。

length: 1–20
enum<string>
required

类目类型。

UNSTRUCTURED
string

父类目 ID,创建子类目时传入。

string

连接器 ID,将类目关联到指定连接器。

Response

200-application/json
string

响应码,成功时为 Success

integer

HTTP 状态码。

string

请求唯一标识,排查问题时请提供此 ID。

object