獲取知識。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
請求參數
名稱 | 類型 | 是否必選 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetKnowledge | 接口功能枚舉值 |
RobotCode | String | 否 | iyityi78979 | 機器人code |
OperatorId | String | 否 | 353245 | 操作人id |
OperatorName | String | 否 | 張三 | 操作人名稱 |
KnowledgeId | Long | 否 | 56643453 | 知識id |
NeedSolution | Boolean | 否 | false | 是否返回答案 |
InstanceType | String | 否 | OFFICIAL | 實例類型 OFFICIAL:官方實例 SHOP:店鋪實例 |
返回數據
名稱 | 類型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 5DEB93BE-E7CB-4115-AFBE-F2013948D71B | Id of the request |
Knowledge | Object | 知識 |
|
KnowledgeId | Long | 2452354 | 知識id |
KnowledgeTitle | String | 你好 | 知識標題 |
KnowledgeStatus | String | online | 知識狀態 "online":在用,"disabled":禁用 |
SceneKey | String | trwet | 場景key |
KnowledgeDescription | String | descghdf | 場景描述 |
CreateTime | String | 2022-09-27 18:00:00 | 創建時間 |
CreateUserId | String | 4543564 | 創建用戶id |
ModifyUserId | String | 4563456 | 修改用戶id |
ModifyTime | String | 2022-09-27 18:00:00 | 修改時間 |
SimilarQuestions | Array of SimilarQuestion | 示例問法集合 |
|
SimilarQuestionId | Long | 5465 | 問法id |
SimilarQuestionTitle | String | 德國大使館 | 示例問法標題 |
SimilarQuestionType | String | similar | 問法類型 "similar":相似問法,"sample":例句,"keyword":關鍵字 |
SimilarQuestionEffectType | String | positive | 問法影響類型 "positive":正向,"negative":負向 |
CreateTime | String | 2022-09-27 18:00:00 | 創建時間 |
ModifyTime | String | 2022-09-27 18:00:00 | 修改時間 |
CreateUserId | String | 43564356 | 創建用戶id |
ModifyUserId | String | 7567456 | 修改用戶id |
SimilarQuestionLevel | String | OFFICIAL | 例句級別 OFFICIAL:官方 SELLER:店鋪 |
Solutions | Array of Solution | 答案集合 |
|
SolutionId | Long | 456346 | 答案id |
KnowledgeId | Long | 25251345 | 知識id |
SolutionType | String | text | 答案類型 "text":文本答案 |
SolutionSource | String | hh | 答案來源 |
SolutionContent | String | 答案正文 | 答案正文 |
Conditions | Array of Condition | 答案約束集合 |
|
KnowledgeId | Long | 10000006 | 知識id |
SolutionId | Long | 10000008 | 答案id |
ConditionType | String | EffectiveMode | 生效模式 |
ConditionValue | String | disable | 生效模式值 "disable":全部不生效,"auto":全自動,"assistant":智能輔助,"enable":全部生效 |
ExtraContent | String | picUrls | 答案擴展信息 圖片 :picUrls, emoji表情 :emojis , 分支具體信息 :branchDetail ,視頻 :videos |
SolutionVariables | Array of SolutionVariable | 變量集合 |
|
KnowledgeId | Long | 35425234 | 知識id |
SolutionId | Long | 354335 | 答案id |
VariableName | String | 類型 | 變量名稱 |
VariableType | String | BASE | 變量類型 |
Packages | Array of Package | 行業包集合 |
|
PackageName | String | 母嬰行業 | 行業包名稱 |
PackageCode | String | my_package | 行業包code |
Category | Object | 知識類目 |
|
CategoryId | Long | 321 | 類目id |
ParentCategoryId | Long | 245 | 父類目id |
CategoryName | String | 分類1 | 類目名稱 |
Success | Boolean | true | 是否成功標示 |
Code | String | 200 | 返回code |
Message | String | Success | 返回信息 |
示例
請求示例
http(s)://[Endpoint]/?Action=GetKnowledge
&RobotCode=iyityi78979
&OperatorId=353245
&OperatorName=張三
&KnowledgeId=56643453
&NeedSolution=false
&InstanceType=OFFICIAL
&公共請求參數
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<GetKnowledgeResponse>
<RequestId>5DEB93BE-E7CB-4115-AFBE-F2013948D71B</RequestId>
<Knowledge>
<KnowledgeId>2452354</KnowledgeId>
<KnowledgeTitle>你好</KnowledgeTitle>
<KnowledgeStatus>online</KnowledgeStatus>
<SceneKey>trwet</SceneKey>
<KnowledgeDescription>descghdf</KnowledgeDescription>
<CreateTime>2022-09-27 18:00:00</CreateTime>
<CreateUserId>4543564</CreateUserId>
<ModifyUserId>4563456</ModifyUserId>
<ModifyTime>2022-09-27 18:00:00</ModifyTime>
<SimilarQuestions>
<SimilarQuestionId>5465</SimilarQuestionId>
<SimilarQuestionTitle>德國大使館</SimilarQuestionTitle>
<SimilarQuestionType>similar</SimilarQuestionType>
<SimilarQuestionEffectType>positive</SimilarQuestionEffectType>
<CreateTime>2022-09-27 18:00:00</CreateTime>
<ModifyTime>2022-09-27 18:00:00</ModifyTime>
<CreateUserId>43564356</CreateUserId>
<ModifyUserId>7567456</ModifyUserId>
<SimilarQuestionLevel>OFFICIAL</SimilarQuestionLevel>
</SimilarQuestions>
<Solutions>
<SolutionId>456346</SolutionId>
<KnowledgeId>25251345</KnowledgeId>
<SolutionType>text</SolutionType>
<SolutionSource>hh</SolutionSource>
<SolutionContent>答案正文</SolutionContent>
<Conditions>
<KnowledgeId>10000006</KnowledgeId>
<SolutionId>10000008</SolutionId>
<ConditionType>EffectiveMode</ConditionType>
<ConditionValue>disable</ConditionValue>
</Conditions>
<ExtraContent>picUrls</ExtraContent>
<SolutionVariables>
<KnowledgeId>35425234</KnowledgeId>
<SolutionId>354335</SolutionId>
<VariableName>類型</VariableName>
<VariableType>BASE</VariableType>
</SolutionVariables>
</Solutions>
<Packages>
<PackageName>母嬰行業</PackageName>
<PackageCode>my_package</PackageCode>
</Packages>
<Category>
<CategoryId>321</CategoryId>
<ParentCategoryId>245</ParentCategoryId>
<CategoryName>分類1</CategoryName>
</Category>
</Knowledge>
<Success>true</Success>
<Code>200</Code>
<Message>Success</Message>
</GetKnowledgeResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "5DEB93BE-E7CB-4115-AFBE-F2013948D71B",
"Knowledge" : {
"KnowledgeId" : 2452354,
"KnowledgeTitle" : "你好",
"KnowledgeStatus" : "online",
"SceneKey" : "trwet",
"KnowledgeDescription" : "descghdf",
"CreateTime" : "2022-09-27 18:00:00",
"CreateUserId" : "4543564",
"ModifyUserId" : "4563456",
"ModifyTime" : "2022-09-27 18:00:00",
"SimilarQuestions" : [ {
"SimilarQuestionId" : 5465,
"SimilarQuestionTitle" : "德國大使館",
"SimilarQuestionType" : "similar",
"SimilarQuestionEffectType" : "positive",
"CreateTime" : "2022-09-27 18:00:00",
"ModifyTime" : "2022-09-27 18:00:00",
"CreateUserId" : "43564356",
"ModifyUserId" : "7567456",
"SimilarQuestionLevel" : "OFFICIAL"
} ],
"Solutions" : [ {
"SolutionId" : 456346,
"KnowledgeId" : 25251345,
"SolutionType" : "text",
"SolutionSource" : "hh",
"SolutionContent" : "答案正文",
"Conditions" : [ {
"KnowledgeId" : 10000006,
"SolutionId" : 10000008,
"ConditionType" : "EffectiveMode",
"ConditionValue" : "disable"
} ],
"ExtraContent" : "picUrls",
"SolutionVariables" : [ {
"KnowledgeId" : 35425234,
"SolutionId" : 354335,
"VariableName" : "類型",
"VariableType" : "BASE"
} ]
} ],
"Packages" : [ {
"PackageName" : "母嬰行業",
"PackageCode" : "my_package"
} ],
"Category" : {
"CategoryId" : 321,
"ParentCategoryId" : 245,
"CategoryName" : "分類1"
}
},
"Success" : true,
"Code" : "200",
"Message" : "Success"
}
錯誤碼
HttpCode | 錯誤碼 | 錯誤信息 | 描述 |
---|---|---|---|
500 | InternalError | The request processing has failed due to some unknown error. | 內部服務出現錯誤 |
訪問錯誤中心查看更多錯誤碼。