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

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

级别: 论坛粉丝
发帖
1296
云币
2596
7_Yxz$m  
yuyI)ebC  
1. 问答服务API W[trsFP1?  
6H+'ezM  
f681i(q"  
​ 问答服务的调用采用Restful API方式,服务内部不保存状态,所以调用和调用之间相互独立。调用API需要校验权限,详细说明见https://help.aliyun.com/document_detail/50410.html %@/"BF;r  
​ 问答服务的输入为目前与用户对话的内容,输出是与输入最匹配的三个知识点,默认第一位最匹配的。 *'5 )CC  
*v1M^grKd  
注意:调用问答服务前,知识库必须先发布,可以在管控台点击“发布”按钮或调用 single:online 接口发布。 ~>C@n'\lv  
}j=UO*|  
;pk4Voo$  
a1p Z{Od  
服务提供方式 u6hDjN  
'@4M yg* b  
~s.~X5  
协议URL方法参数
HTTPSnlsapi.aliyun.com/qasPOSTbody中的json字符串
p mv6m  
ZJL8"(/R  
请求示例 BE,XiH;  
xJCMxt2Y  
<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. }
B4tC3r  
e6?iQ0  
请求参数说明 PE!/n6  
qp#Is{=m  
U.XvS''E  
参数类型是否必须说明
versionString协议版本号,必须是2.0
app_keyString创建项目时返回的appId,加上”nui-“前缀
questionString问题
optional/domainsString主题列表,多个主题用分号隔开。如果设置了主题,就从这些主题中匹配答案,否则就从该用户的全部知识库匹配答案
optional/topInteger返回答案数量,默认3个
i}&&rr  
r"E%U:y3P  
返回结果示例 Y.}"<{RQ  
]izrr  
<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. }
wDQ@$T^vh  
L/J1;  
返回参数说明 /"+CH\) E  
f-.dL  
|~K 5]  
参数类型是否必须说明
idString请求id
successBoolean请求是否处理成功
error_codeString如果失败,对应的错误
error_messageString错误信息
answers[]/questionString知识库中匹配到的问题
answers[]/answerString知识库中匹配到的答案
answers[]/scoreFloat该答案对应的得分(0-1.0之间),分越高,答案越准确
answers[]/domainString该条答案所在的主题
answers[]/optionalObject附加数据,不同的业务定义己的数据格式
)])nd "E  
"h@=O c  
2. 知识库管理API cyMvjzzRN  
\DiAfx<Ub  
_ez*dE%  
=:M/hM)#  
2.1 通用接口 ybC0Ee@  
+P &S0/  
1^ijKn@6  
服务提供方式 !+k);;.+  
协议URL方法参数
HTTPSnlsapi.aliyun.com/manage/qasPOSTbody中为json字符串,query中需要一个action参数
I[6ft_*  
请求参数说明 UVd ^tg  
参数名类型示例备注
actionStringprojects:list全小写,在query中,https://nlsapi.aliyun.com/manage/qas?action=projects:list
String{“offset”:0, “pageSize”:10}在body中,action对应的参数组
}PXtwp13&u  
返回结果为json格式,所有接口返回结果格式一致,唯一区别为data里面的内容。 *V`E)maU  
参数类型是否必须说明
requestIdString唯一请求id
resultCodeInteger错误码
resultMessageString返回信息
dataObject每个业务的返回数据
[;C|WTYSL  
错误码为调用返回的resultCode,具体数值如下: 0{OafL8&l  
错误码说明
0成功
1登录超时
2输入参数错误
3服务器内部错误
4项目名重复
5项目个数达到最大
6资源不存在
100token错误
@CtnV|  
O[|_~v:^  
2.2 具体调用参数说明 _ea|E  8  
.MS41 E!  
S l`F`  
$qR<_6j  
2.2.1 创建项目 G@3Jw[t  
[w*]\x'S  
]Pl Ly:(  
Action: projects:create @iU(4eX  
请求参数说明 I&%KOe0  
参数类型是否必须说明
nameString项目名,最大长度为40
descriptionString项目描述,最大长度为160
"$nff=]  
请求示例<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. }
=3Ohy,5L  
返回结果<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. }
d3]<'B:nb  
返回结果说明 O'{g{  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId,加上”nui-“前缀即app key
createTimeString项目创建时间
)&$mFwf  
M2nWvU$  
2.2.2 列出项目 FOAXm4"  
Yw6uh4  
1'%n?\OK66  
Action: projects:list i~LY  
请求参数: -br): }f  
参数类型是否必须说明
offsetInteger从第几个项目开始列出
pageSizeInteger每页个数
fizL_`uMqb  
请求示例:<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. }
& h\!#X0  
返回结果:<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. }
3*E] :l_  
返回结果说明 P VSz%"  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId
createTimeString创建时间
totalInteger项目总数
TSH'OW !b  
K@vU_x0Sl  
2.2.3 更新项目 t[/APm-k~>  
0$_WIk  
+q%b'!&Q  
Action: projects:update  L+CPT  
请求参数: *#1J  
参数类型是否必须说明
idLong项目id
nameString项目名,最大长度40
descriptionString项目描述,最大长度160
AYAbq}'Yt  
请求示例:<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. }
(3Z;c_N  
返回结果说明: Svdmg D!  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId
createTimeString创建时间
&YBZuq2?  
RWFvf   
2.2.4 删除项目 S4pEBbV^n  
]!uId#OH  
aoBiN_  
Action: projects:delete qYQ vjp  
注:该操作会删除项目相关的所有信息,包括主题、知识点等,请谨慎操作。 - LB}=  
请求参数: =y=MljEX  
参数类型是否必须说明
idLong项目id
Y8h 96  
请求示例:<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. }
Yq'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.   "requestId":"xxxx-xxx-xxx",
  3.   "resultCode":0,
  4.   "resultMessage":"OK",
  5.   "data":""
  6. }
+$F,!rV-s  
ornU8H`  
2.2.5 获得项目详细信息 NieNfurG%  
mNsd&Rk'  
MpTOC&NG%s  
Action: projects:get h@TP=  
请求参数: $&&+2?cx0  
参数类型是否必须说明
idLong项目id
?g:sAR'  
请求示例:<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. }
}D-jTZlC  
返回结果:<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. }
dK4w$~j{k  
返回结果说明: [c XSk  
参数类型是否必须说明
idLong项目id
nameString项目名
descriptionString项目描述
appIdString项目appId
createTimeString创建时间
e-%q!F(Bf  
cgO<%_l3`  
2.2.6 创建主题 dkeMiL m  
T^A[m0mk  
'<>?gE0Cd  
Action: theme:create v57<b&p26  
请求参数: Y[W:Zhl;  
参数类型是否必须说明
nameString主题名,最大长度30
descriptionString描述,最大长度50
projectIdLong项目id
RRQIlI<  
请求示例:<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. }
C;%dZ  
返回结果:<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. }
)Cat$)I#,  
返回结果说明 z`p9vlS[  
参数类型是否必须说明
idLong主题id
nameString主题名称
descriptionString主题描述
projectIdLong项目id
lPrAx0m13%  
i5|)|x3  
2.2.7 列出主题 6Kw?  
:^-\KE` 3  
64vj6 &L  
Action: theme:list 7fXJP5j  
请求参数: FlUO3rc|  
参数类型是否必须说明
offsetInteger从第几个主题开始列出
pageSizeInteger每页个数
projectIdLong项目id
*aq"c9  
请求示例:<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. }
c|Z6p{)V  
返回结果:<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. }
qz.l  
返回结果说明: JcMl*k  
参数类型是否必须说明
idLong主题id
nameString主题名称
descriptionString主题描述
projectIdLong项目id
totalInteger总主题数
G_zK .N   
A~^x*#q{4  
2.2.8 更新主题 IkG;j+=  
oKH+Q6S:  
sXNb  
Action: theme:update <;uM/vS i  
请求参数: 8'NT_NPNb  
参数类型是否必须说明
nameString主题名,最大长度30
descriptionString描述,最大长度50
projectIdLong项目id
idLong主题id
;}M&fXFp"|  
请求示例:<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. }
+n$ruoRJh  
返回结果:<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. }
m&z(2yb1  
返回结果说明 M?o_J4  
参数类型是否必须说明
idLong主题id
nameString主题名称
descriptionString主题描述
projectIdLong项目id
EXwU{Hl  
S]Di1E^r;_  
级别: 新人
发帖
7
云币
16
只看该作者 沙发  发表于: 11-27
Re智能对话平台API如何使用1
厉害!!!  !!! 楼主加油 !!!
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
验证问题: ECS是阿里云提供的什么服务? 正确答案:云服务器
上一个 下一个