获取知识

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
RobotCode String iyityi78979

机器人code

OperatorId String 353245

操作人id

OperatorName String 张三

操作人名称

KnowledgeId Long 56643453

知识id

NeedSolution Boolean false

是否返回答案

返回数据

名称 类型 示例值 描述
RequestId String 5DEB93BE-E7CB-4115-AFBE-F2013948D71B

Id of the request

Knowledge Object

知识

KnowledgeId Long 2452354

知识id

KnowledgeTitle String 你好

知识标题

KnowledgeStatus String "online":在用,"disabled":禁用

知识状态

SceneKey String trwet

场景key

KnowledgeDescription String descghdf

场景描述

CreateTime String 格式:yyyy-MM-dd HH:mm:ss

创建时间

CreateUserId String 4543564

创建用户id

ModifyUserId String 4563456

修改用户id

ModifyTime String 格式:yyyy-MM-dd HH:mm:ss

修改时间

SimilarQuestions Array of SimilarQuestion

示例问法集合

SimilarQuestionId Long 5465

问法id

SimilarQuestionTitle String 德国大使馆

示例问法标题

SimilarQuestionType String "similar":相似问法,"sample":例句,"keyword":关键字

问法类型

SimilarQuestionEffectType String "positive":正向,"negative":负向

问法影响类型

CreateTime String 格式:yyyy-MM-dd HH:mm:ss

创建时间

ModifyTime String 格式:yyyy-MM-dd HH:mm:ss

修改时间

CreateUserId String 43564356

创建用户id

ModifyUserId String 7567456

修改用户id

Solutions Array of Solution

答案集合

SolutionId Long 456346

答案id

KnowledgeId Long 25251345

知识id

SolutionType String "text":文本答案

答案类型,

SolutionSource String hh

答案来源

SolutionContent String 答案正文

答案正文

Conditions Array of Condition

答案约束集合

KnowledgeId Long 10000006

知识id

SolutionId Long 10000008

答案id

ConditionType String EffectiveMode

生效模式

ConditionValue String "disable":全部不生效,"auto":全自动,"assistant":智能辅助,"enable":全部生效

生效模式值

ExtraContent String 图片 :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
&公共请求参数

正常返回示例

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":在用,"disabled":禁用</KnowledgeStatus>
        <SceneKey>trwet</SceneKey>
        <KnowledgeDescription>descghdf</KnowledgeDescription>
        <CreateTime>格式:yyyy-MM-dd HH:mm:ss</CreateTime>
        <CreateUserId>4543564</CreateUserId>
        <ModifyUserId>4563456</ModifyUserId>
        <ModifyTime>格式:yyyy-MM-dd HH:mm:ss</ModifyTime>
        <SimilarQuestions>
            <SimilarQuestionId>5465</SimilarQuestionId>
            <SimilarQuestionTitle>德国大使馆</SimilarQuestionTitle>
            <SimilarQuestionType>"similar":相似问法,"sample":例句,"keyword":关键字</SimilarQuestionType>
            <SimilarQuestionEffectType>"positive":正向,"negative":负向</SimilarQuestionEffectType>
            <CreateTime>格式:yyyy-MM-dd HH:mm:ss</CreateTime>
            <ModifyTime>格式:yyyy-MM-dd HH:mm:ss</ModifyTime>
            <CreateUserId>43564356</CreateUserId>
            <ModifyUserId>7567456</ModifyUserId>
        </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":全部不生效,"auto":全自动,"assistant":智能辅助,"enable":全部生效</ConditionValue>
            </Conditions>
            <ExtraContent>图片 :picUrls,  emoji表情 :emojis , 分支具体信息 :branchDetail ,视频 :videos</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>
</GetKnowledgeResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "5DEB93BE-E7CB-4115-AFBE-F2013948D71B",
  "Knowledge" : {
    "KnowledgeId" : 2452354,
    "KnowledgeTitle" : "你好",
    "KnowledgeStatus" : "\"online\":在用,\"disabled\":禁用",
    "SceneKey" : "trwet",
    "KnowledgeDescription" : "descghdf",
    "CreateTime" : "格式:yyyy-MM-dd HH:mm:ss",
    "CreateUserId" : "4543564",
    "ModifyUserId" : "4563456",
    "ModifyTime" : "格式:yyyy-MM-dd HH:mm:ss",
    "SimilarQuestions" : [ {
      "SimilarQuestionId" : 5465,
      "SimilarQuestionTitle" : "德国大使馆",
      "SimilarQuestionType" : "\"similar\":相似问法,\"sample\":例句,\"keyword\":关键字",
      "SimilarQuestionEffectType" : "\"positive\":正向,\"negative\":负向",
      "CreateTime" : "格式:yyyy-MM-dd HH:mm:ss",
      "ModifyTime" : "格式:yyyy-MM-dd HH:mm:ss",
      "CreateUserId" : "43564356",
      "ModifyUserId" : "7567456"
    } ],
    "Solutions" : [ {
      "SolutionId" : 456346,
      "KnowledgeId" : 25251345,
      "SolutionType" : "\"text\":文本答案",
      "SolutionSource" : "hh",
      "SolutionContent" : "答案正文",
      "Conditions" : [ {
        "KnowledgeId" : 10000006,
        "SolutionId" : 10000008,
        "ConditionType" : "EffectiveMode",
        "ConditionValue" : "\"disable\":全部不生效,\"auto\":全自动,\"assistant\":智能辅助,\"enable\":全部生效"
      } ],
      "ExtraContent" : "图片 :picUrls,  emoji表情 :emojis , 分支具体信息 :branchDetail ,视频 :videos",
      "SolutionVariables" : [ {
        "KnowledgeId" : 35425234,
        "SolutionId" : 354335,
        "VariableName" : "类型",
        "VariableType" : "BASE"
      } ]
    } ],
    "Packages" : [ {
      "PackageName" : "母婴行业",
      "PackageCode" : "my_package"
    } ],
    "Category" : {
      "CategoryId" : 321,
      "ParentCategoryId" : 245,
      "CategoryName" : "分类1"
    }
  }
}

错误码

HttpCode 错误码 错误信息 描述
500 InternalError The request processing has failed due to some unknown error. 内部服务出现错误

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。