BatchAddKbFiles - 批量添加知识库文件

批量添加知识库文件。

服务接入点与授权信息

产品 资源 所需权限
通义灵码 知识库文件 读写

请求语法

POST https://{domain}/oapi/v1/lingma/organizations/{organizationId}/knowledgeBases/{kbId}/files/batchUpload

请求头

参数 类型 是否必填 描述 示例值
x-yunxiao-token string 个人访问令牌。 pt-0fh3****0fbG_35af****0484

请求参数

参数 类型 位置 是否必填 描述 示例值
organizationId string path 所属企业 ID。
kbId string path 知识库 id。
- multipart/form-data body
      files array[File] body 待上传的真实文件列表。 path/to/file

请求示例

curl -X 'POST' \
  'https://test.rdc.aliyuncs.com/oapi/v1/lingma/organizations/{organizationId}/knowledgeBases/{kbId}/files/batchUpload' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --form 'files=@"path/to/file"' \
  --form 'files=@"path/to/file"'

返回参数

参数 类型 描述 示例值
- array
      - object
            failedMessage string 失败的原因,如果成功则为空。
            fileId string 文件唯一 id。
            operateUserId string 操作用户 id。
            success boolean 是否成功。

返回示例

[
    {
        "failedMessage": "",
        "fileId": "",
        "operateUserId": "",
        "success": false
    }
]

错误码

访问错误码中心查看 API 相关错误码。

results matching ""

    No results matching ""