POST /dataAgent/llm/openApi/v2/deepresearch/getKnowledgeBaseDocuments
查询知识库下的文档列表。
字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| int | 是 | 智能体 ID | |
| int | 是 | 项目(tenant)ID | |
getKnowledgeBaseDocuments | int | 是 | 知识引擎侧知识库 ID,需配合 | |
| string | 否 | 文档名模糊搜索 | |
| int | 否 |
| 当前页码 |
| int | 否 |
| 每页数量 |
返回标准分页结构 PaginationInfo:
字段 | 类型 | 说明 |
|---|---|---|
| int | 当前页码 |
| int | 每页数量 |
| int | 总条数 |
| int | 总页数 |
| bool | 是否有下一页 |
| bool | 是否成功 |
| string | 错误信息 |
| array | 文档列表,常见字段 |
入参
curl -X POST \ "https://${IDA_DOMAIN}/dataAgent/llm/openApi/v2/deepresearch/getKnowledgeBaseDocuments" \ -H "Authorization: Bearer ${JWT_TOKEN}" \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'App-Id: 1' \ -H 'Content-Language: zh-CN' \ -H 'Content-Type: application/json' \ --data-raw '{"page":1,"pageSize":200,"agentId":2,"appId":1,"knowledgeEngineBaseId":189}' \ --silent | jq
响应:
{ "JSONIFY_PRETTYPRINT_REGULAR": false, "code": "llm/ok", "msg": {}, "data": { "errorMsg": "", "hasNextPage": false, "isSuccess": true, "page": 1, "pageSize": 200, "total": 4, "totalPages": 1, "items": [ { "id": 1001, "name": "xxx品牌知识库.docx", "kbId": 100, "type": "WORD", "status": "1", "size": 180000, "chunkNum": 5, "tokenNum": 0, "progress": 1, "progressMsg": "FINISHED", "processDuation": 0.68, "sourceType": "sophon", "parserId": "xxxx", "parserConfig": { "chunkSettings": { "chunkType": "default", "genAtomicQuestion": false, "maxSegmentLength": 1024, "mergeSmallChunks": false, "removeSpaces": true, "removeUrlsPics": true, "separator": "\n", "smallChunkTokenThreshold": 100 }, "completenessCheck": false, "imageExtraction": true, "sensitiveWordCheck": false, "sophonSubDocChunk": {"xxxx": 5}, "spellCheck": false, "tableExtraction": false }, "location": "/storage/rag/tenant-id/file-uuid-1.docx", "downloadable": true, "isEnabled": true, "folderId": 0, "labels": [], "autoDeleteOnExpire": false, "validDate": "永久有效", "createdBy": "user_001", "createDate": "2026-06-06 10:00:00", "createTime": 1700000000000, "updateDate": "2026-06-06 10:00:30", "updateTime": 1700000030000, "run": "3", "subDocs": [], "contentCategory": [] }, { "id": 1002, "name": "knowledge_base_sample.csv", "kbId": 100, "type": "CSV", "status": "1", "size": 6000, "chunkNum": 64, "tokenNum": 0, "progress": 1, "progressMsg": "FINISHED", "sourceType": "sophon", "parserId": "xxxx", "labels": [ { "labelId": 11, "labelName": "da_knowledge_type", "labelType": "multiple_value_text", "labelValueBuilder": "manual", "labelValues": [ { "id": 34, "labelValueBuilder": "manual", "value": "BUSINESS_KNOWLEDGE", "valueUsage": 0 } ], "createDate": "2026-06-06 10:00:00", "createTime": 1700000000000, "updateDate": "2026-06-06 10:00:00", "updateTime": 1700000000000 } ], "location": "/storage/rag/tenant-id/file-uuid-2.csv", "downloadable": true, "isEnabled": true, "folderId": 0, "validDate": "永久有效", "createdBy": "user_001", "createDate": "2026-06-02 10:00:00", "updateDate": "2026-06-02 10:00:10" }, { "id": 1003, "name": "财务分析框架模板.pdf", "kbId": 100, "type": "PDF", "size": 700000, "chunkNum": 12, "progress": 1, "progressMsg": "FINISHED", "parserId": "xxxx", "labels": [ { "labelId": 11, "labelName": "da_knowledge_type", "labelValues": [ { "id": 35, "value": "ANALYSIS_TEMPLATE", "labelValueBuilder": "manual" } ] } ], "location": "/storage/rag/tenant-id/file-uuid-3.pdf", "createDate": "2026-06-02 10:00:00", "updateDate": "2026-06-02 10:00:30" }, { "id": 1004, "name": "eval_details_sample.txt", "kbId": 100, "type": "TXT", "size": 56000, "chunkNum": 76, "progress": 1, "progressMsg": "FINISHED", "parserId": "xxxx", "location": "/storage/rag/tenant-id/file-uuid-4.txt", "createDate": "2026-06-02 10:00:00", "updateDate": "2026-06-02 10:00:10" } ] } }