Appearance
知识库
获取知识库列表
GET /plugins/knowledge_base/knowledge_bases
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
conditions | query | string | false | none |
sort | query | string | false | 排序字段 |
offset | query | string | false | 分页偏移值, 默认0 |
limit | query | string | false | 每一页数量, 默认10 |
响应
json
{
"data": [
{
"id": "15",
"title": "111",
"summary": "",
"status": "published",
"likeNum": "0",
"favoriteNum": "1",
"showable": "open",
"updatedTime": "2020-12-09T11:54:20+08:00",
"owners": {
"id": "2",
"nickname": "admin",
"title": "首席讲师事实上",
"loginTime": "1615944945",
"hireDate": "0",
"uuid": "c3a59fde919898131b8e4e99b7473ad960a86efd",
"truename": "AshleyAAAAA",
"avatar": {
"small": "http://qa2.edusoho.cn/files/user/2019/03-19/173618248f95570345.png",
"middle": "http://qa2.edusoho.cn/files/user/2019/03-19/173618247f42280607.png",
"large": "http://qa2.edusoho.cn/files/user/2019/03-19/173618246a23910880.png"
}
},
"updatedUser": {
"id": "1211",
"nickname": "yisanna",
"title": "测试",
"loginTime": "1615945967",
"hireDate": "0",
"uuid": "129812d5eb38f1e94c6d504433235e02e50754d9",
"truename": "yisannayisannay",
"avatar": {
"small": "http://qa2.edusoho.cn/files/default/2020/07-15/094521131725426337.jpg",
"middle": "http://qa2.edusoho.cn/files/default/2020/07-15/094521130261328613.jpg",
"large": "http://qa2.edusoho.cn/files/default/2020/07-15/09452112ee60915196.jpg"
}
},
"category": {
"id": "512",
"name": "分类1"
},
"knowledgeNum": "5",
"hitNum": "25",
"fileSize": [
"248.2",
"KB"
],
"fileNum": "4",
"isSubscribe": 0,
"memberNum": "2"
}
],
"paging": {
"total": 1,
"offset": 0,
"limit": 10
}
}
参数说明
名称 | 类型 | 必选 | 约束 | 说明 |
---|---|---|---|---|
» id | integer(int64) | false | none | 知识库Id |
» title | string | false | none | 标题 |
» summary | string | false | none | 简介 |
» likeNum | integer(int64) | false | none | 点赞数 |
» favoriteNum | integer(int64) | false | none | 收藏数 |
» knowledgeNum | integer(int64) | false | none | 知识数量 |
» hitNum | integer(int64) | false | none | 访问数量 |
» fileSize | array | false | none | 文件总量 |
»» 0 | integer(int64) | false | none | 文件大小 |
»» 1 | string | false | none | 文件大小单位 |
» fileNum | integer(int64) | false | none | 文件数量 |
» memberNum | integer(int64) | false | none | 订阅数量 |
» isSubscription | integer(int64) | false | none | 当前用户是否订阅 |
» category | array | false | none | none |
»» id | integer(int64) | false | none | 分类ID |
»» name | string | false | none | 分类名称 |
» owner | array | false | none | none |
»» uuid | string | false | none | none |
»» nickname | string | false | none | none |
»» truename | string | false | none | none |
» updatedUser | array | false | none | none |
» updatedTime | integer(int64) | false | none | none |
获取知识库信息
GET /plugins/knowledge_base/knowledge_bases/{id}
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
响应
json
{
"id": "15",
"title": "111",
"summary": "",
"status": "published",
"likeNum": "0",
"favoriteNum": "1",
"showable": "open",
"updatedTime": "2020-12-09T11:54:20+08:00",
"org": {
"id": "1",
"name": "测试企业微信",
"code": "FullSite"
},
"knowledgeNum": "5",
"hitNum": "25",
"fileSize": [
"248.2",
"KB"
],
"updatedUser": {
"id": "1211",
"nickname": "yisanna",
"title": "测试",
"loginTime": "1615945967",
"hireDate": "0",
"uuid": "129812d5eb38f1e94c6d504433235e02e50754d9",
"truename": "yisannayisannay",
"avatar": {
"small": "http://qa2.edusoho.cn/files/default/2020/07-15/094521131725426337.jpg",
"middle": "http://qa2.edusoho.cn/files/default/2020/07-15/094521130261328613.jpg",
"large": "http://qa2.edusoho.cn/files/default/2020/07-15/09452112ee60915196.jpg"
}
},
"category": {
"id": "512",
"name": "分类1"
},
"manageRole": "admin",
"isSubscribe": 0,
"owners": {
"id": "2",
"nickname": "admin",
"title": "首席讲师事实上",
"loginTime": "1615944945",
"hireDate": "0",
"uuid": "c3a59fde919898131b8e4e99b7473ad960a86efd",
"truename": "AshleyAAAAA",
"avatar": {
"small": "http://qa2.edusoho.cn/files/user/2019/03-19/173618248f95570345.png",
"middle": "http://qa2.edusoho.cn/files/user/2019/03-19/173618247f42280607.png",
"large": "http://qa2.edusoho.cn/files/user/2019/03-19/173618246a23910880.png"
}
},
"managers": [],
"authors": [],
"publishOrg": [],
"publishPost": [],
"publishUserGroup": [],
"publishPostRank": []
}
参数说明
名称 | 类型 | 必选 | 约束 | 说明 |
---|---|---|---|---|
id | integer(int64) | false | none | none |
title | string | false | none | none |
summary | string | false | none | none |
likeNum | integer(int64) | false | none | 点赞数量 |
favoriteNum | integer(int64) | false | none | 收藏数量 |
knowledgeNum | integer(int64) | false | none | 知识数量 |
hitNum | integer(int64) | false | none | 访问数量 |
fileSize | FileSize | false | none | 文件总量 |
org | Org | false | none | none |
categoryId | string | false | none | none |
isSubscription | integer(int64) | false | none | 当前用户是否订阅 |
owner | User | false | none | none |
managers | [User] | false | none | none |
authors | [User] | false | none | none |
showable | string | false | none | none |
visible_org | [string] | false | none | 发布范围-组织机构 |
visible_post | [string] | false | none | 发布范围-岗位 |
visible_user_group | [string] | false | none | 发布范围-用户组 |
visible_post_rank | [string] | false | none | 发布范围-职级 |
updatedTime | integer(int64) | false | none | none |
更新知识库信息
PATCH /plugins/knowledge_base/knowledge_bases/{id}
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
title | body | string | true | 标题 |
summary | body | string | true | 简介 |
orgId | body | integer(int64) | true | 所属部门 |
categoryId | body | integer(int64) | false | 知识库分类 |
ownerIds | body | [string] | false | 负责人 |
managerIds | body | [string] | false | 管理组 |
authorIds | body | [string] | false | 作者组 |
showable | body | string | true | 发布范围类型 |
visible_org | body | [string] | false | 发布范围-组织机构 |
visible_post | body | [string] | false | 发布范围-岗位 |
visible_user_group | body | [string] | false | 发布范围-用户组 |
visible_post_rank | body | [string] | false | 发布范围-职级 |
响应
json
{
"success": true
}
获取订阅名单列表
GET /plugins/knowledge_base/knowledge_bases/{id}/members
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
postId | query | string | false | 岗位 |
username | query | string | false | 姓名/用户名 |
sort | query | string | false | 排序字段 |
offset | query | string | false | 分页偏移值, 默认0 |
limit | query | string | false | 每一页数量, 默认10 |
响应
json
{
"data": [
{
"id": "2608",
"knowledgeBaseId": "1",
"userId": "882",
"createdUserId": "882",
"createdTime": "2020-12-22T14:40:47+08:00",
"nickname": "wangcaijuan",
"truename": "",
"post": {
"id": "116",
"name": "11",
"code": "11145634563"
},
"orgs": [
{
"id": "1",
"name": "测试企业微信",
"code": "FullSite"
}
]
},
{
"id": "1969",
"knowledgeBaseId": "1",
"userId": "272",
"createdUserId": "272",
"createdTime": "2020-12-07T23:52:44+08:00",
"nickname": "金XX",
"truename": "金XX",
"post": {
"id": "116",
"name": "11",
"code": "11145634563"
},
"orgs": [
{
"id": "1",
"name": "测试企业微信",
"code": "FullSite"
}
]
}
],
"paging": {
"total": 2,
"offset": 0,
"limit": 10
}
}
参数说明
名称 | 类型 | 必选 | 约束 | 说明 |
---|---|---|---|---|
» id | integer(int64) | false | none | none |
» nickname | string | false | none | none |
» truename | string | false | none | none |
» orgs | [Org] | false | none | none |
»» id | integer(int64) | false | none | none |
»» code | string | false | none | none |
»» name | string | false | none | none |
» post | [Post] | false | none | none |
»» id | integer(int64) | false | none | none |
»» name | string | false | none | none |
»» code | string | false | none | none |
» createdTime | integer(int64) | false | none | none |
订阅知识库
POST /plugins/knowledge_base/knowledge_bases/{id}/members
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
响应
{
"success": true
}
取消订阅
DELETE /plugins/knowledge_base/knowledge_bases/{id}/members
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
响应
{
"success": true
}