创建一个新的项目源
开发环境
开发环境
POST
https://app.customgpt.ai/api/v1/projects/{projectId}/sources
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.customgpt.ai/api/v1/projects//sources' \
--header 'authorization;' \
--form 'sitemap_path=""' \
--form 'file_data_retension=""' \
--form 'is_ocr_enabled=""' \
--form 'is_anonymized=""' \
--form 'file=@""'
响应示例响应示例
201 - 示例 1
{
"status": "string",
"data": {
"id": 0,
"created_at": "string",
"updated_at": "string",
"type": "string",
"settings": {
"executive_js": true,
"data_refresh_frequency": "string",
"create_new_pages": true,
"remove_unexist_pages": true,
"refresh_existing_pages": "string",
"sitemap_path": "string"
},
"pages": [
{
"id": 0,
"page_url": "string",
"page_url_hash": "string",
"project_id": 0,
"s3_path": "string",
"crawl_status": "string",
"index_status": "string",
"is_file": true,
"is_file_kept": true,
"filename": "string",
"filesize": 0,
"created_at": "string",
"updated_at": "string",
"deleted_at": "string"
}
]
}
}
请求参数
Path 参数
projectId
string
必需
Header 参数
authorization
string
必需
Body 参数multipart/form-data
sitemap_path
string
站点地图路径
file_data_retension
boolean
文件数据保留
is_ocr_enabled
boolean
启用 OCR
is_anonymized
boolean
匿名
file
file
可选
返回响应
修改于 2024-02-22 05:57:39