查询知识库列表 本文介绍查询知识库列表内容。 接口描述 查询租户下可用的知识库列表 请求方法 GET 接口要求 无 URI /openapi/v1/infobases/list 请求参数 请求头header参数 参数 是否必填 参数类型 说明 示例 下级对象 tenantId 是 String 租户ID abcb82293b1a40e1b97ea05e50dd8170 ctyuneoprequestid 是 String 用户请求 id,由用户构造,用户可以通过 uuid 等方法自行生成唯一字符串,用于日志请求追踪。 abcfa732b27b464fb15a21ed6845afd5 eopdate 是 String 请求时间,由用户构造,形如 yyyymmddTHHMMSSZ。 20211221T163014Z host 是 String 终端节点域名,固定字段 koaglobal.ctapi.ctyun.cn EopAuthorization 是 String 由天翼云官网 accessKey 和 securityKey 经签名后生成,参与签名生成的字段包括天翼云官网 accessKey 、securityKey、用户请求id(非必须),请求时间,终端节点域名(非必须)以及请求体内容。 请求代码示例 plaintext Curl X GET " H "ctyuneoprequestid:33dfa732b27b464fb15a21ed6845afd5" H "tenantId:XXX" H "EopAuthorization:XXX" H "eopdate:20211109T104641Z" H "host:kqaglobal.ctapi.ctyun.cn" 返回值说明 1.请求成功返回响应参数 参数 参数类型 说明 示例 下级对象 statusCode String 200表示成功 200 message String 固定为Success Success returnObj Array 接口返回结果 returnObj 表returnObj 参数 参数类型 说明 示例 下级对象 id Int 知识库ID 1 name String 知识库名称 我的知识库 type Int 知识库类型 1:通用 2:自定义 2 categoryId Int 类别ID 2 createTime String 创建时间 20230508T15:14:00Z updateTime String 更新时间 20230508T15:14:00Z count Int 文件数量 4 2.请求失败返回响应参数 参数 参数类型 说明 示例 下级对象 statusCode String 错误码,放置API对应的错误码 40001 message String 失败信息 缺少鉴权信息 error String 返回对应的错误码 KQA40001 返回值示例 1.请求成功返回值示例 plaintext { "statusCode": "200", "error": null, "message": "Success", "returnObj": [ { "type": 2, "id": 280, "name": "test22", "categoryId": 124, "createTime": "20250917T15:14:02+08:00", "updateTime": "20250917T15:14:02+08:00", "count": 4 }, { "type": 2, "id": 279, "name": "test21", "categoryId": 124, "createTime": "20250917T15:13:55+08:00", "updateTime": "20250917T15:13:55+08:00", "count": 4 }, { "type": 1, "id": 278, "name": "test12", "categoryId": 124, "createTime": "20250917T15:13:43+08:00", "updateTime": "20250917T15:13:43+08:00", "count": 4 } ] } 2.请求失败返回值示例 plaintext { "statusCode": "40004", "error": "KQA40004", "message": "接口执行异常" } 状态码 http状态码 描述 200 表示请求成功 错误码说明 见通用错误码。