知识库-文件

获取知识库文件列表

GET /plugins/knowledge_base/knowledge_files

权限

  • 需要认证

请求参数

名称 位置 类型 必选 说明
knowledgeBaseId query string true 知识库id
useStatus query string true 使用状态
type query string true 类型
keyword query string true 搜索关键词

响应

{
    "data": [
        {
            "id": "1305",
            "filename": "bug总结.docx",
            "fileSize": "13.96KB",
            "convertStatus": "success",
            "type": "document",
            "storage": "cloud",
            "canDownload": "0",
            "usedCount": 1,
            "createdTime": "2020-12-07T22:30:57+08:00",
            "audioConvertStatus": "none",
            "user": {
                "nickname": "yisanna",
                "truename": "yisannayisannay"
            }
        }
    ],
    "paging": {
        "total": 1,
        "offset": 0,
        "limit": 10
    }
}

参数响应

名称 类型 必选 约束 说明
» id integer(int64) false none none
» filename string false none none
» fileSize string false none none
» convertStatus string false none 转码状态[waiting/doing 正在文件格式转换 error 文件格式转换失败 none 未转码 success 已转码]
» level string false none sd标清 hd高清 shd超清
» hasCaption integer(int64) false none 是否有字幕
» type string false none none
» storage string false none none
» usedCount integer(int64) false none none
» createdTime integer(int64) false none none
» audioConvertStatus string false none 音频转码状态[none: 未转音频 waiting: 等待转音频 doing: 音频转码中 success: 转音频成功 error: 转音频失败]
» user object false none none
»» nickname string false none none
»» truename string false none none

移除知识库文件

DELETE /plugins/knowledge_base/knowledge_files

权限

  • 需要认证

请求参数

名称 位置 类型 必选 说明
knowledgeBaseId body string true 知识库id
ids body array true 文件id
isDeleteFile body string true

响应

{
    "success": true
}

播放文件接口

GET /plugins/knowledge_base/knowledge_files/{id}/plays

权限

  • 需要认证

请求参数

名称 位置 类型 必选 说明
id path string true none
knowledgeBaseId query string true 知识库id

响应

{

    "resNo": "",
    "token": "",
    "processStatus": "",
    "type": ""
}

参数说明

名称 类型 必选 约束 说明
resNo integer(int64) false none 云资源编号,globalId
token string false none 云资源播放token
processStatus string false none 转码是否完成
type string false none 文件类型

下载文件接口

GET /plugins/knowledge_base/knowledge_files/{id}/downloads

权限

  • 需要认证

请求参数

名称 位置 类型 必选 说明
id path string true none
knowledgeBaseId query string true 知识库id

响应

{
    "url": ""
}

参数说明

名称 类型 必选 约束 说明
url string false none 下载地址

results matching ""

    No results matching ""