Skip to main content

Create Category

Create a new category under the current workspace.

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": "Product Docs",
    "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, obtained from the API Key page in the console.

Body

application/json
string
required

Category name.

length: 1–20
enum<string>
required

Category type.

UNSTRUCTURED
string

Parent category ID. Set this to create a child category.

string

Connector ID. Associates the category with a specific connector.

Response

200-application/json
string

Response code. Success on success.

string

Error or informational message; an empty string on success.

string

Unique request identifier. Include this ID when reporting an issue.

object
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.