查询文档状态
最新更新:2023-11-02

查询文档状态

查询知识库文档的状态。

请求方式

GET

调用地址

https://api.gptbots.ai/v1/bot/data/detail/list

调用验证

详情参见【API 概述】内的鉴权方式说明。

请求

请求示例

curl --location https://api.gptbots.ai/v1/bot/data/detail/list?data_ids=65e18b26e121ab08cefb4a53&data_ids=65e18b26e121ab08cefb4a5333 \ -H 'Authorization: Bearer your_apikey' \ -H 'Content-Type: application/json' }'
          curl --location https://api.gptbots.ai/v1/bot/data/detail/list?data_ids=65e18b26e121ab08cefb4a53&data_ids=65e18b26e121ab08cefb4a5333 \ 
  -H 'Authorization: Bearer your_apikey' \ 
  -H 'Content-Type: application/json' 
}'

        
此代码块在浮窗中显示

请求头

字段 类型 描述
Authorization Bearer ${token} 使用 Authorization: Bearer ${token} 进行调用验证,请在 API 密钥页面获取密钥作为 token。
Content-Type application/json 数据类型,取值为 application/json

请求体

字段 类型 必填 描述
data_ids array Yes 文档 ID,可提交多个。

响应

响应示例

[ { "data_id": "65e18b26e121ab08cefb4a53", "data_status": "AVAILABLE" } ]
          [
    {
        "data_id": "65e18b26e121ab08cefb4a53",
        "data_status": "AVAILABLE"
    }
]

        
此代码块在浮窗中显示

成功响应

字段 类型 描述
doc JSON Array 文档信息。
data_id string 文档 ID。
data_status string 文档状态。

失败响应

字段 类型 描述
code int 错误码。
message string 错误详情。

错误码

Code Message
40000 参数错误
40127 开发者鉴权失败
20059 Bot 已删除