获取知识。
调试
您可以在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. | 内部服务出现错误 |
访问错误中心查看更多错误码。