文档中心 > API类目 > 知识库API

alibaba.kclub.kc.qa.get.dingding (知识云-查询单个知识详情)

知识云-查询单个知识详情

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
question_id Number 必须 1 1
filter KcQaFilter 可选 系统自动生成
  • └ statuses
  • String []
  • 可选
  • [1]
  • 状态
  • └ views
  • String []
  • 必须
  • [1]
  • 视角
  • └ need_child_knowledge
  • Boolean
  • 可选
  • true
  • 是否需要子知识
auth TenancyAuth 可选 系统自动生成
  • └ name
  • String
  • 必须
  • test
  • auth名称
  • └ secret_key
  • String
  • 必须
  • test
  • auth key

响应参数

名称 类型 示例值 描述
result Result result 接口返回model
  • └ success
  • Boolean
  • false
  • 是否成功
  • └ code
  • String
  • code
  • code
  • data
  • KcQaReadDto
  • 1234
  • 返回素材id
  • child_qas
  • KcQaReadDto []
  • 子知识
  • solutions
  • KcQaSolutionDto []
  • 子知识答案
  • └ extra_content
  • String
  • 子知识答案额外内容
  • └ type
  • Number
  • 子知识答案视角
  • └ summary
  • String
  • 子知识答案摘要
  • └ content_view
  • String
  • 子知识答案视角,逗号分隔
  • └ content_type
  • Number
  • 子知识答案类型
  • └ content
  • String
  • 子知识答案
  • └ question_id
  • Number
  • 子知识问题id
  • └ gmt_modified
  • Date
  • 子知识答案编辑时间
  • └ gmt_create
  • Date
  • 子知识答案创建时间
  • └ id
  • Number
  • 子知识答案id
  • └ plain_text
  • String
  • 子知识答案纯文本
  • └ id
  • Number
  • 子知识id
  • └ gmt_create
  • Date
  • 子知识创建时间
  • └ gmt_modified
  • Date
  • 子知识编辑时间
  • └ title
  • String
  • 子知识标题
  • └ status
  • Number
  • 子知识状态
  • └ tenant_id
  • Number
  • 子知识租户
  • └ cat_id
  • Number
  • 子知识类目id
  • └ cat_path
  • String
  • 子知识类目路径
  • └ parent_cats
  • Number []
  • 子知识父类目id列表
  • └ entity_code
  • String
  • 子知识关联实体code
  • solutions
  • KcQaSolutionDto []
  • 问题答案
  • └ id
  • Number
  • 答案id
  • └ gmt_create
  • Date
  • 创建时间
  • └ gmt_modified
  • Date
  • 更新时间
  • └ question_id
  • Number
  • 知识id
  • └ content
  • String
  • 内容
  • └ content_type
  • Number
  • 类型
  • └ content_view
  • String
  • 视角
  • └ extra_content
  • String
  • 扩展
  • └ type
  • Number
  • 视角
  • └ summary
  • String
  • 摘要
  • └ plain_text
  • String
  • 纯文本
  • └ id
  • Number
  • 知识id
  • └ gmt_create
  • Date
  • 创建时间
  • └ gmt_modified
  • Date
  • 更新时间
  • └ title
  • String
  • 标题
  • └ status
  • Number
  • 状态
  • └ tenant_id
  • Number
  • 租户
  • └ cat_id
  • Number
  • 类目id
  • └ cat_path
  • String
  • 类目路径
  • └ parent_cats
  • Number []
  • 父类目路径
  • └ entity_code
  • String
  • 实体code
  • └ question_type
  • Number
  • 问题类型
  • └ context
  • Number
  • 问题context
  • └ message
  • String
  • message

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaKclubKcQaGetDingdingRequest req = new AlibabaKclubKcQaGetDingdingRequest();
req.setQuestionId(1L);
AlibabaKclubKcQaGetDingdingRequest.KcQaFilter obj1 = new AlibabaKclubKcQaGetDingdingRequest.KcQaFilter();
obj1.setStatuses("1");
obj1.setViews("1");
obj1.setNeedChildKnowledge(true);
req.setFilter(obj1);
AlibabaKclubKcQaGetDingdingRequest.TenancyAuth obj2 = new AlibabaKclubKcQaGetDingdingRequest.TenancyAuth();
obj2.setName("test");
obj2.setSecretKey("test");
req.setAuth(obj2);
AlibabaKclubKcQaGetDingdingResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_kclub_kc_qa_get_dingding_response>
    <result>
        <success>false</success>
        <code>code</code>
        <data>
            <child_qas>
                <kc_qa_read_dto>
                    <solutions>
                        <kc_qa_solution_dto>
                            <extra_content></extra_content>
                            <type></type>
                            <summary></summary>
                            <content_view></content_view>
                            <content_type></content_type>
                            <content></content>
                            <question_id></question_id>
                            <gmt_modified></gmt_modified>
                            <gmt_create></gmt_create>
                            <id></id>
                            <plain_text></plain_text>
                        </kc_qa_solution_dto>
                    </solutions>
                    <id></id>
                    <gmt_create></gmt_create>
                    <gmt_modified></gmt_modified>
                    <title></title>
                    <status></status>
                    <tenant_id></tenant_id>
                    <cat_id></cat_id>
                    <cat_path></cat_path>
                    <parent_cats>
                        <number></number>
                    </parent_cats>
                    <entity_code></entity_code>
                </kc_qa_read_dto>
            </child_qas>
            <solutions>
                <kc_qa_solution_dto>
                    <id></id>
                    <gmt_create></gmt_create>
                    <gmt_modified></gmt_modified>
                    <question_id></question_id>
                    <content></content>
                    <content_type></content_type>
                    <content_view></content_view>
                    <extra_content></extra_content>
                    <type></type>
                    <summary></summary>
                    <plain_text></plain_text>
                </kc_qa_solution_dto>
            </solutions>
            <id></id>
            <gmt_create></gmt_create>
            <gmt_modified></gmt_modified>
            <title></title>
            <status></status>
            <tenant_id></tenant_id>
            <cat_id></cat_id>
            <cat_path></cat_path>
            <parent_cats>
                <number></number>
            </parent_cats>
            <entity_code></entity_code>
            <question_type></question_type>
            <context></context>
        </data>
        <message></message>
    </result>
</alibaba_kclub_kc_qa_get_dingding_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部