文件导入
更新时间:2024-07-25
本地文件类型
请求url: /ku/openapi/files/import
请求方式:POST
请求参数:
Headers:
| 参数名称 | 参数值 | 是否必须 | 备注 |
|---|---|---|---|
| Content-Type | multipart/form-data | 是 |
Body:
| 名称 | 类型 | 是否必须 | 默认值 | 备注 |
|---|---|---|---|---|
| file | MultipartFile | 必须 | ||
| spaceGuid | string | 必须 | 文件接入的知识库的公司id | |
| groupGuid | string | 必须 | 文件接入的知识库的部门id | |
| repositoryGuid | string | 必须 | 文件接入的知识库的知识库id | |
| parentGuid | string | 非必须 | "" | 文件的父节点docGuid |
| extraField | string | 非必须 | "" | 建库所需的额外字段toJsonString{"author": "liyahui"} |
返回参数:
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| returnCode | number | 非必须 | |||
| returnMessage | string | 非必须 | |||
| result | object | 非必须 | |||
| id | number | 非必须 | |||
| spaceGuid | string | 非必须 | |||
| groupGuid | string | 非必须 | |||
| repositoryGuid | string | 非必须 | |||
| docGuid | string | 非必须 | |||
| parentGuid | string | 非必须 | |||
| childCount | number | 非必须 | |||
| position | number | 非必须 | |||
| userGuid | string | 非必须 | |||
| nickname | string | 非必须 | |||
| operatorGuid | string | 非必须 | |||
| operatorNickname | string | 非必须 | |||
| name | string | 非必须 | |||
| scope | number | 非必须 | |||
| abstracts | string | 非必须 | |||
| images | string | 非必须 | |||
| status | number | 非必须 | -20彻底删除,-15删除,20正常 | ||
| version | string | 非必须 | |||
| knowledge | string | 非必须 | |||
| type | number | 非必须 | 文档类型:1普通文档,2知识本目录,3知识本文档 | ||
| bookType | number | 非必须 | 1不在知识本内(包含知识本节点),2在知识本内 | ||
| created | string | 非必须 | |||
| modified | string | 非必须 | |||
| publishTime | string | 非必须 | 文档发布时间 | ||
| publisherGuid | string | 非必须 | 文档发布者guid | ||
| publisherNickname | string | 非必须 | 发布者昵称 | ||
| repoScope | number | 非必须 | 知识库的公开范围 | ||
| bookScope | number | 非必须 | 知识本的公开范围 | ||
| sourceType | number | 非必须 | 文档来源 10:新建,15:任务okr创建,50:wiki迁移,60:导入 | ||
| rootGuid | string | 非必须 | |||
| traceId | string | 非必须 |
Plain Text
1{
2 "returnCode": 200,
3 "returnMessage": "OK",
4 "result": {
5 "id": 13024,
6 "spaceGuid": "bqfPOkPW5g",
7 "groupGuid": "GQr8qOIGOw",
8 "repositoryGuid": "3zExpcBYeF",
9 "docGuid": "0d6438b2b0e242",
10 "parentGuid": "00000000000000",
11 "childCount": 0,
12 "position": 1.710841128551E12,
13 "positionV1": null,
14 "userGuid": "lB5LN2PiBp",
15 "nickname": "wangwentingDD",
16 "operatorGuid": "lB5LN2PiBp",
17 "operatorNickname": "wangwentingDD",
18 "name": "liyahui(3)",
19 "scope": 20,
20 "abstracts": null,
21 "images": null,
22 "status": 20,
23 "version": "2",
24 "knowledge": null,
25 "type": 1,
26 "bookType": 1,
27 "created": 1710841128755,
28 "modified": 1710841128755,
29 "publishTime": 1710841128755,
30 "publisherGuid": "lB5LN2PiBp",
31 "publisherNickname": "wangwentingDD",
32 "repoScope": null,
33 "bookScope": null,
34 "sourceType": null,
35 "rootGuid": null
36 },
37 "traceId": "a8232ca332fa4490aa761988e3d8ccfc"
38}
url类型
请求url: /ku/openapi/client/files/import
请求方式:POST
请求参数:
Headers:
| 参数名称 | 参数值 | 是否必须 | 备注 |
|---|---|---|---|
| Content-Type | application/json | 是 |
Body:
| 名称 | 类型 | 是否必须 | 默认值 | 备注 |
|---|---|---|---|---|
| fileName | string | 必须 | 文件名称 | |
| downloadUrl | string | 必须 | 文件下载链接 | |
| spaceGuid | string | 必须 | 文件上传的知识库的公司id | |
| groupGuid | string | 必须 | 文件上传的知识库的部门id | |
| repositoryGuid | string | 必须 | 文件上传的知识库的知识库id | |
| parentGuid | string | 非必须 | "" | 父节点id, 非必传 |
| extraField | string | 非必须 | "" | 建库所需的额外字段toJsonString {"author": "liyahui"} |
返回参数:
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| returnCode | number | ||||
| returnMessage | string | ||||
| result | object | ||||
| id | number | ||||
| spaceGuid | string | ||||
| groupGuid | string | ||||
| repositoryGuid | string | ||||
| docGuid | string | ||||
| parentGuid | string | ||||
| childCount | number | ||||
| position | number | ||||
| userGuid | string | ||||
| nickname | string | ||||
| operatorGuid | string | ||||
| operatorNickname | string | ||||
| name | string | ||||
| scope | number | ||||
| abstracts | string | ||||
| images | string | ||||
| status | number | -20彻底删除,-15删除,20正常 | |||
| version | string | ||||
| knowledge | string | ||||
| type | number | 文档类型:1普通文档,2知识本目录,3知识本文档 | |||
| bookType | number | 1不在知识本内(包含知识本节点),2在知识本内 | |||
| created | string | ||||
| modified | string | ||||
| publishTime | string | 文档发布时间 | |||
| publisherGuid | string | 文档发布者guid | |||
| publisherNickname | string | 发布者昵称 | |||
| repoScope | number | 知识库的公开范围 | |||
| bookScope | number | 知识本的公开范围 | |||
| sourceType | number | 档来源 10:新建,15:任务okr创建,50:wiki迁移,60:导入 | |||
| rootGuid | string | ||||
| traceId | string |
Plain Text
1{
2 "returnCode": 200,
3 "returnMessage": "OK",
4 "result": {
5 "id": 19981730,
6 "spaceGuid": "HFVrC7hq1Q",
7 "groupGuid": "pKzJfZczuc",
8 "repositoryGuid": "6pTdpBz7hW",
9 "docGuid": "bM2bCFNuZUi-a-",
10 "parentGuid": "xaiIBcZHM0GV4z",
11 "childCount": 0,
12 "position": 1.705060926924E12,
13 "userGuid": "tQnR0xzoHf",
14 "nickname": "向伟成",
15 "operatorGuid": "tQnR0xzoHf",
16 "operatorNickname": "向伟成",
17 "name": "【导入】搜索技术交流",
18 "scope": 20,
19 "abstracts": null,
20 "images": null,
21 "status": 20,
22 "version": "2",
23 "knowledge": null,
24 "type": 1,
25 "bookType": 3,
26 "created": 1705060927007,
27 "modified": 1705060927007,
28 "publishTime": 1705060927013,
29 "publisherGuid": "tQnR0xzoHf",
30 "publisherNickname": "向伟成",
31 "repoScope": null,
32 "bookScope": null,
33 "sourceType": 60, // 文档来源 10:新建,15:任务okr创建,50:wiki迁移,60:导入
34 "rootGuid": "7R8VAT1KDavkP5"
35 },
36 "traceId": "400982703819536384"
37}
