# 在线文档追加文档内容

文档 API 使用须知

# host: https://yach-oapi.zhiyinlou.com 正式环境

# host: https://yach-oapi-test.zhiyinlou.com 测试环境

# 概述

名称
地址 /openapi/v2/doc/content/append
请求方式 POST
参数 见【参数】
返回值 见【返回值】

# 参数(URL参数)

参数 参数类型 必须 说明
access_token String 调用接口凭证(示例值:NHhmZXp0VEtwMExJTzhxxxxxxx)
guid String 文件guid,和kn_node_id以及file_url三选一
kn_node_id String 知识库节点ID,和文件guid以及file_url三选一
file_url String 文件URL(示例值:https://st.tal.com/a/UYHgoV 《在线文档1》,需做URL编码),和kn_node_id以及guid三选一
content String 追加的内容

# 请求示例(curl)

curl --request POST \
  --url 'https://yach-oapi-test.zhiyinlou.com/openapi/v2/doc/content/append' \
  --header 'Accept: */*' \
  --header 'Accept-Encoding: gzip, deflate, br' \
  --header 'Connection: keep-alive' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
  --data '{
    "access_token":"NHhmZXp0VEtwMExJTzhjUTNxxxxxxxx",
    "kn_node_id": "123456",
    "content":"ces "
}'

# 返回值

(响应状态码200为请求成功(接口层面),非200为请求失败;业务层面需结合返回体中的code判断)

{
  "code": 200,
  "obj": null,
  "msg": ""
}
foo