更新知识库 本文介绍更新知识库内容。 接口描述 更新知识库名称 请求方法 POST 接口要求 无 URI /openapi/v1/infobases/update 请求参数 请求头header参数 参数 是否必填 参数类型 说明 示例 下级对象 ContentType 是 String json格式 application/json tenantId 是 String 租户ID 562b89493b1a40e1b97ea05e50dd8170 ctyuneoprequestid 是 String 用户请求 id,由用户构造,用户可以通过 uuid 等方法自行生成唯一字符串,用于日志请求追踪 33dfa732b27b464fb15a21ed6845afd5 eopdate 是 String 请求时间,由用户构造,形如 yyyymmddTHHMMSSZ。 20211221T163014Z host 是 String 终端节点域名,固定字段 kqaglobal.ctapi.ctyun.cn EopAuthorization 是 String 由天翼云官网 accessKey 和 securityKey 经签名后生成,参与签名生成的字段包括天翼云官网 accessKey 、securityKey、平台应用的appkey(非必须),用户请求id(非必须),请求时间,终端节点域名(非必须)以及请求体内容。 请求体body参数 参数 是否必填 参数类型 说明 示例 下级对象 id 是 Int 知识库ID 100 name 是 String 知识库名称 工业设计 请求代码示例 plaintext Curl X POST " H "ContentType: application/json" H "ctyuneoprequestid:33dfa732b27b464fb15a21ed6845afd5" H "tenantId:XXX" H "EopAuthorization:XXX" H "eopdate:20211109T104641Z" H "host:kqaglobal.ctapi.ctyun.cn" data '{ "id": 100, "name": "工业设计" }' 返回值说明 1.请求成功返回响应参数 参数 参数类型 说明 示例 下级对象 statusCode String 返回状态,返回200表示成功 200 message String 返回Success Success returnObj Object 接口返回结果 returnObj表 returnObj表 参数 参数类型 说明 示例 下级对象 id Int 知识库ID 100 name String 知识库名称 工业设计 type String 知识库类型 1 categoryId Int 类目ID 20 createTime String 创建时间 20230508T15:14:00Z updateTime String 更新时间 20230508T15:14:00Z 2.请求失败返回响应参数 参数 参数类型 说明 示例 下级对象 statusCode String 错误码,放置API对应的错误码 40001 message String 失败信息 缺少鉴权信息 error String 返回对应的错误码 KQA40001 返回值示例 1.请求成功返回值示例 plaintext { "statusCode": "200", "error": null, "message": "Success", "returnObj": { "type": 1, "id": 100, "name": "工业设计", "categoryId": 20, "createTime": "20250918T16:23:57+08:00", "updateTime": "20250918T16:24:47+08:00" } } 2.请求失败返回值示例 plaintext { "statusCode": "40004", "error": "KQA40004", "message": "接口执行异常" } 状态码 http状态码 描述 200 表示请求成功 错误码说明 错误码 错误信息 错误描述 40005 知识库不存在 未查询到可用知识库 40006 知识库名称重复 知识库不可重名