获取FAQ知识标签列表
请求地址
请求参数
Query parameters
Parameter |
Type |
Optional |
Description |
robotId |
Integer |
false |
机器人ID. |
请求结果
Path |
Type |
Description |
code |
Integer |
执行结果码 |
message |
String |
执行结果说明 |
data |
Array |
知识标签信息 |
data[].id |
Integer |
标签ID. |
data[].robotId |
Integer |
机器人Id. |
data[].name |
String |
名称. |
data[].description |
String |
描述. |
data[].regex |
String |
正则. |
data[].parentId |
Integer |
标签的父ID. |
data[].parentIds |
String |
标签的父ID路径,逗号分隔. |
data[].type |
Integer |
1:全部 2:未分类 3:用户自定义标签 |
示例
$ curl 'https://km.udesk.cn/api/v1/questionLabels/findAllWithNum?email=admin@udesk.cn×tamp=1529402433&sign=e4f683120c26df279b3642ac77b0bd8bf621584a&robotId=102' -i -H 'Accept: application/json'
返回
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"paging": {
"pageNum": 1,
"pageSize": 10,
"total": 5
},
"data": [
{
"id": -1,
"robotId": 551,
"name": "全部",
"description": null,
"regex": null,
"parentId": 0,
"parentIds": "0,",
"type": 1,
"ranking": 0
},
{
"id": 2147483647,
"robotId": 551,
"name": "无知识标签",
"description": null,
"regex": null,
"parentId": -1,
"parentIds": "0,-1,",
"type": 2,
"ranking": 0
},
{
"id": 140,
"robotId": 551,
"name": "无人机",
"description": "",
"regex": "",
"parentId": 139,
"parentIds": "0,-1,139,",
"type": 3,
"ranking": 1
},
{
"id": 142,
"robotId": 551,
"name": "一代",
"description": "",
"regex": "",
"parentId": 140,
"parentIds": "0,-1,139,140,",
"type": 3,
"ranking": 1
},
{
"id": 147,
"robotId": 551,
"name": "按钮消息",
"description": "",
"regex": "",
"parentId": 146,
"parentIds": "0,-1,146,",
"type": 3,
"ranking": 1
}
]
}
获取FAQ知识标签详情
请求地址
- GET /v1/questionLabels/:id
请求参数
Path parameters
Parameter |
Type |
Optional |
Description |
id |
Integer |
false |
标签ID. |
请求结果
Path |
Type |
Description |
code |
Integer |
执行结果码 |
message |
String |
执行结果说明 |
data |
Object |
知识标签信息 |
data.id |
Integer |
标签ID. |
data.robotId |
Integer |
机器人Id. |
data.name |
String |
名称. |
data.description |
String |
描述. |
data.regex |
String |
正则. |
data.parentId |
Integer |
标签的父ID. |
data.parentIds |
String |
标签的父ID路径,逗号分隔. |
data.type |
Integer |
1:全部 2:未分类 3:用户自定义标签 |
示例
$ curl 'https://km.udesk.cn/api/v1/questionLabels/147?email=admin@udesk.cn×tamp=1529402429&sign=c8b3e4dfef80a80e6125d2863912f6cdf1d20509' -i -H 'Accept: application/json'
返回
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data" : {
"id": 147,
"robotId": 551,
"name": "按钮消息",
"description": "",
"regex": "",
"parentId": 146,
"parentIds": "0,-1,146,",
"type": 3,
"ranking": 1
}
}
删除FAQ知识标签
请求地址
- DELETE /v1/questionLabels/:id
请求参数
Path parameters
Parameter |
Type |
Optional |
Description |
id |
Integer |
false |
标签ID. |
请求结果
示例
$ curl 'https://km.udesk.cn/api/v1/questionLabels/147?email=admin@udesk.cn×tamp=1529402432&sign=67df1ddd1aad415933d63da93ca24b59c8970740' -i -X DELETE -H 'Content-Type: application/json'
新建FAQ知识标签
请求地址
请求参数
Request fields
Parameter |
Type |
Optional |
Description |
name |
String |
true |
标签名称. |
description |
String |
false |
描述. |
regex |
String |
false |
正则. |
parentId |
Integer |
false |
标签的父级ID. |
robotId |
Integer |
true |
机器人ID. |
请求结果
Path |
Type |
Description |
code |
Integer |
执行结果码 |
message |
String |
执行结果说明 |
data |
Object |
知识标签信息 |
data.id |
Integer |
标签ID. |
data.robotId |
Integer |
机器人Id. |
data.name |
String |
名称. |
data.description |
String |
描述. |
data.regex |
String |
正则. |
data.parentId |
Integer |
标签的父ID. |
data.parentIds |
String |
标签的父ID路径,逗号分隔. |
data.type |
Integer |
1:全部 2:未分类 3:用户自定义标签 |
示例
$ curl 'https://km.udesk.cn/api/v1/questionLabels?email=admin@udesk.cn×tamp=1529402431&sign=bd23cf273d088d9c9031958712670673dae1d5ce' -i -X POST -H 'Content-Type: application/json' -d '{
"name" : "标签2",
"parentId" : 342,
"robotId" : 102
}'
返回
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data" : {
"id" : 384,
"name" : "标签2",
"parentId" : 342,
"parentIds" : "0,342,",
"robotId" : 102,
"type": 2
}
}