添加 URL 来源
Add a URL as a knowledge source
请求头
xi-api-key
xi-workspace-id
经销商 API 密钥操作的客户工作区。
请求
This endpoint expects an object.
url
要读取的 HTTPS 页面或网站。
crawl_entire_site
Crawl the whole site instead of only the page at url.
响应
成功响应
id
知识源 ID。
source_type
来源是上传的文件、网页还是网站。
允许的值:
source_url
“url”来源的页面或网站 URL。
last_scraped_at_unix
上次读取 URL 的时间,以秒为单位的 Unix 时间戳。
original_filename
“file”来源的上传文件名;URL 为空。
content_type
上传文件的 MIME 类型;URL 为空。
file_size_bytes
上传文件大小(字节);URL 为 0。
status
处理状态:‘processing’、‘ready’ 或 ‘error’。
允许的值:
error_message
当状态为 ‘error’ 时,处理失败的原因。
failure_reason
Machine-readable cause of the failure, when status is ‘error’.
crawl_entire_site
是否抓取整个网站,而非仅抓取 source_url 中的单个页面。
scraped_pages_count
为 ‘url’ 来源读取的页面数量。
content_preview
A short plain-text preview of the content.
processing_started_at_unix
处理开始时间,以秒为单位的 Unix 时间戳。
created_at_unix
创建时间,以秒为单位的 Unix 时间戳。
updated_at_unix
上次更新时间,以秒为单位的 Unix 时间戳。
错误
422
Unprocessable Entity Error