阿里云
发表主题 回复主题
  • 760阅读
  • 1回复

[干货分享]智能对话平台API如何使用?(1)

级别: 论坛粉丝
发帖
1296
云币
2596
S 9|^VU  
mFt\xGa  
1. 问答服务API qtuT%?wT@Z  
`NfwW:  
1BSn#Dnj  
​ 问答服务的调用采用Restful API方式,服务内部不保存状态,所以调用和调用之间相互独立。调用API需要校验权限,详细说明见https://help.aliyun.com/document_detail/50410.html C!Jy;Z=+u  
​ 问答服务的输入为目前与用户对话的内容,输出是与输入最匹配的三个知识点,默认第一位最匹配的。 *onVG5<  
wLxuSs|  
注意:调用问答服务前,知识库必须先发布,可以在管控台点击“发布”按钮或调用 single:online 接口发布。 0E9 lv"3o  
b^A7R{G7  
NR"C@3kD]o  
MAQ-'s@  
服务提供方式 8X/SNRk6p  
E {UhM q7  
f#-\*  
协议URL方法参数
HTTPSnlsapi.aliyun.com/qasPOSTbody中的json字符串
Fb ~h{  
mR$0Ij/v  
请求示例 N{<5)L~Y  
JsEnhE}]  
<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.     "version": "2.0",
  3.     "app_key": "nui-abcefghi",
  4.     "question": "你是谁?",
  5.     "optional": {"domains":"theme1;theme2;theme3","top":3}
  6. }
~MP/[,j`  
!Ej?9LHo  
请求参数说明 /Mj|Px%  
PmQeO*f+  
?;A\>sP  
参数类型是否必须说明
versionString协议版本号,必须是2.0
app_keyString创建项目时返回的appId,加上”nui-“前缀
questionString问题
optional/domainsString主题列表,多个主题用分号隔开。如果设置了主题,就从这些主题中匹配答案,否则就从该用户的全部知识库匹配答案
optional/topInteger返回答案数量,默认3个
k"E|E";B  
_ Td#C1g3  
返回结果示例 KN&|&51p}  
J!">L+Zcx  
<pre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "id": "921a3c8ac36c4df39dd714dd52344a53",
  3.   "success": true,
  4.   "error_code": "",
  5.   "error_message": "",
  6.   "answers": [
  7.     {
  8.       "question": "",
  9.       "answer": "",
  10.       "score": "",
  11.       "domain": "",
  12.       "optional": {}
  13.     },
  14.     {
  15.       "question": "",
  16.       "answer": "",
  17.       "score": "",
  18.       "domain": "",
  19.       "optional": {}
  20.     },
  21.     {
  22.       "question": "",
  23.       "answer": "",
  24.       "score": "",
  25.       "domain": "",
  26.       "optional": {}
  27.     }
  28.   ]
  29. }
/#SH`ZK  
"LH3ZPD  
返回参数说明 r.c:QY$  
~du U& \  
Pa"Kk9!o36  
参数类型是否必须说明
idString请求id
successBoolean请求是否处理成功
error_codeString如果失败,对应的错误
error_messageString错误信息
answers[]/questionString知识库中匹配到的问题
answers[]/answerString知识库中匹配到的答案
answers[]/scoreFloat该答案对应的得分(0-1.0之间),分越高,答案越准确
answers[]/domainString该条答案所在的主题
answers[]/optionalObject附加数据,不同的业务定义己的数据格式
.3#Xjhebvu  
S;oRE' kk  
2. 知识库管理API w-C%,1F,/  
&8I*N6p:%/  
}PM7CZSq  
E33WT{H&_'  
2.1 通用接口 <9c{Kt.5(  
y1[@4TY]  
b1G6'~U-  
服务提供方式 9W-1P}e,  
协议URL方法参数
HTTPSnlsapi.aliyun.com/manage/qasPOSTbody中为json字符串,query中需要一个action参数
\GKR(~f  
请求参数说明 / %iS\R%ca  
参数名类型示例备注
actionStringprojects:list全小写,在query中,https://nlsapi.aliyun.com/manage/qas?action=projects:list
String{“offset”:0, “pageSize”:10}在body中,action对应的参数组
4~8-^^  
返回结果为json格式,所有接口返回结果格式一致,唯一区别为data里面的内容。 b|iIdDK  
参数类型是否必须说明
requestIdString唯一请求id
resultCodeInteger错误码
resultMessageString返回信息
dataObject每个业务的返回数据
/82E[P"}6R  
错误码为调用返回的resultCode,具体数值如下: KTwP.!<v  
错误码说明
0成功
1登录超时
2输入参数错误
3服务器内部错误
4项目名重复
5项目个数达到最大
6资源不存在
100token错误
?mN!9/DIc  
G[u{! 2RS  
2.2 具体调用参数说明 `u_k?)lK  
KHGUR(\Rd6  
Z,"YMUl'  
DghqSL ^s  
2.2.1 创建项目 *SpE XO  
B\qy:nr j  
R<%{I)  
Action: projects:create ltMcEv-d0  
请求参数说明 }*O8]lG  
参数类型是否必须说明
nameString项目名,最大长度为40
descriptionString项目描述,最大长度为160
fI'+4 )@x  
请求示例<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "name":"测试项目",
  3.   "description":"这是一个测试项目"
  4. }
(ak&>pk;  
返回结果<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId": "xxxxx-xxx-xxx",
  3.   "resultCode": 0,
  4.   "resultMessage": "OK",
  5.   "data": {
  6.     "id": 1,
  7.     "name": "测试项目",
  8.     "description": "这是一个测试项目",
  9.     "appId": "wdhlqi9a",
  10.     "createTime": "2010-11-10 13:46:00"
  11.   }
  12. }
P0U&+^W"9  
返回结果说明 DF'~ #G8  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId,加上”nui-“前缀即app key
createTimeString项目创建时间
d`% 7Pk  
c%&*yR  
2.2.2 列出项目 8*|*@  
1]vDM&9  
!89hO4 0r  
Action: projects:list G({VK  
请求参数: 91DevizXx  
参数类型是否必须说明
offsetInteger从第几个项目开始列出
pageSizeInteger每页个数
} :gi<#-:G  
请求示例:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "offset":0,
  3.   "pageSize":10
  4. }
=kzHZc  
返回结果:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId": "xxxxx-xxx-xxx",
  3.   "resultCode": 0,
  4.   "resultMessage": "OK",
  5.   "data": {
  6.     "total": 100,
  7.     "offset": 0,
  8.     "pageSize": 10,
  9.     "items": [
  10.       {
  11.         "id": 1,
  12.         "name": "test1",
  13.         "description": "test1 desc text",
  14.         "appId": "wdhlqi9a",
  15.         "createTime": "2010-11-10 13:46:00"
  16.       },
  17.       {
  18.         "id": 2,
  19.         "name": "test2",
  20.         "description": "test2 desc text",
  21.         "appId": "wdhlqi9a",
  22.         "createTime": "2010-11-10 13:46:00"
  23.       }
  24.     ]
  25.   }
  26. }
VuN#j<H  
返回结果说明 `-K[$V  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId
createTimeString创建时间
totalInteger项目总数
6E(..fo:"  
%*Vr}@BA)  
2.2.3 更新项目 (E~6fb "c  
y(E<MRd8V  
}]<|`FNc  
Action: projects:update Nus]]Iy-g  
请求参数: 8-cuaa  
参数类型是否必须说明
idLong项目id
nameString项目名,最大长度40
descriptionString项目描述,最大长度160
KP $AT}D  
请求示例:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "id":1,
  3.   "name":"test",
  4.   "description":"test description"
  5. }
<pre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId": "xxxxx-xxx-xxx",
  3.   "resultCode": 0,
  4.   "resultMessage": "OK",
  5.   "data": {
  6.     "id": 1,
  7.     "name": "test1",
  8.     "description": "test1 desc text",
  9.     "appId": "wdhlqi9a",
  10.     "createTime": "2010-11-10 13:46:00"
  11.   }
  12. }
^g"p}zf L"  
返回结果说明: Der'45]*^  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId
createTimeString创建时间
L|;sB=$'{  
x5rLGt  
2.2.4 删除项目 Uv~|Xj4.  
P :%b[7  
BxZ7Bk  
Action: projects:delete .YP&E1lNi  
注:该操作会删除项目相关的所有信息,包括主题、知识点等,请谨慎操作。 Y]5MM:mI  
请求参数: +oHbAPs8  
参数类型是否必须说明
idLong项目id
tCPK_Wws?Z  
请求示例:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "id":1
  3. }
_j*I\  
返回结果:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId":"xxxx-xxx-xxx",
  3.   "resultCode":0,
  4.   "resultMessage":"OK",
  5.   "data":""
  6. }
{+3g*s/HI  
9E0x\%2K  
2.2.5 获得项目详细信息 7@m+ y  
d>Nh<PqH6  
v!$?;"d+  
Action: projects:get \~t!M~H  
请求参数: IS;[oJef  
参数类型是否必须说明
idLong项目id
9`? M-U  
请求示例:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "id":1
  3. }
?{5}3a bB`  
返回结果:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId": "xxxxx-xxx-xxx",
  3.   "resultCode": 0,
  4.   "resultMessage": "OK",
  5.   "data": {
  6.     "id": 1,
  7.     "name": "测试项目",
  8.     "description": "这是一个测试项目",
  9.     "appId": "wdhlqi9a",
  10.     "createTime": "2010-11-10 13:46:00"
  11.   }
  12. }
.])X.7@x  
返回结果说明: Lw1[)Vk}E  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId
createTimeString创建时间
<s$T7Zk  
wfcR[  
2.2.6 创建主题 `U>2H4P  
+Yc@<$4  
ZPz=\^  
Action: theme:create H0.A;`  
请求参数: ]mgpd}Y  
参数类型是否必须说明
nameString主题名,最大长度30
descriptionString描述,最大长度50
projectIdLong项目id
AN|f:259  
请求示例:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "name":"test",
  3.   "description":"desc",
  4.   "projectId":1
  5. }
7u5H o`  
返回结果:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId":"xxxx-xxx-xx",
  3.   "resultCode":"0",
  4.   "resultMessage":"OK",
  5.   "data": {
  6.     "id":1,
  7.       "name":"test",
  8.       "description":"desc",
  9.       "projectId":1
  10.   }
  11. }
2iOYC0`!  
返回结果说明 <HIM k  
参数类型是否必须说明
idLong主题id
nameString主题名称
descriptionString主题描述
projectIdLong项目id
ya,-Lt  
?[Ma" l>  
2.2.7 列出主题 F2EX7Crj  
IY mkZ?cW  
eV }H  
Action: theme:list oL<5hN*D  
请求参数: w|*D{`O  
参数类型是否必须说明
offsetInteger从第几个主题开始列出
pageSizeInteger每页个数
projectIdLong项目id
x~{W(;`!  
请求示例:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "offset":0,
  3.   "pageSize":10,
  4.   "projectId":1
  5. }
up0=Y o@  
返回结果:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId":"xxxx-xxx-xx",
  3.   "resultCode":0,
  4.   "resultMessage":"OK",
  5.   "data":{
  6.     "total":100,
  7.     "offset":0,
  8.     "pageSize":10,
  9.     "items":[
  10.       {
  11.         "id":1,
  12.         "name":"test1",
  13.         "description":"desc1",
  14.         "projectId":1
  15.       },
  16.       {
  17.         "id":2,
  18.         "name":"test2",
  19.         "description":"desc2",
  20.         "projectId":1
  21.       }
  22.     ]
  23.   }
  24. }
sBqOcy  
返回结果说明: 4T v=sP  
参数类型是否必须说明
idLong主题id
nameString主题名称
descriptionString主题描述
projectIdLong项目id
totalInteger总主题数
h'_$I4e)  
U)Tl<l<  
2.2.8 更新主题 &FYv4J  
xe3Jxo !U  
zqZ/z>Gf  
Action: theme:update .f>7a;V?}  
请求参数: BlcsDB =ka  
参数类型是否必须说明
nameString主题名,最大长度30
descriptionString描述,最大长度50
projectIdLong项目id
idLong主题id
~@[<y1g?nG  
请求示例:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "id":1,
  3.   "name":"test",
  4.   "description":"desc1",
  5.   "projectId":1
  6. }
!67xN?b  
返回结果:<divre style='background: rgb(246, 246, 246); font: 12px/1.6 "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; margin: 0px 0px 16px; padding: 10px; outline: 0px; border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(51, 51, 51); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; white-space: pre-wrap; word-wrap: break-word; box-sizing: border-box; orphans: 2; widows: 2; font-size-adjust: none; font-stretch: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;' prettyprinted?="" linenums="">
  1. {
  2.   "requestId":"xxxx-xxx-xx",
  3.   "resultCode":"0",
  4.   "resultMessage":"OK",
  5.   "data": {
  6.     "id":1,
  7.       "name":"test",
  8.       "description":"desc",
  9.       "projectId":1
  10.   }
  11. }
GJHJ?^%  
返回结果说明 @,]W  
参数类型是否必须说明
idLong主题id
nameString主题名称
descriptionString主题描述
projectIdLong项目id
k72NXagh  
ap"pQ[t;  
级别: 新人
发帖
7
云币
16
只看该作者 沙发  发表于: 2017-11-27
Re智能对话平台API如何使用1
厉害!!!  !!! 楼主加油 !!!
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
验证问题: ECS是阿里云提供的什么服务? 正确答案:云服务器
上一个 下一个