创建知识导入任务
创建知识导入任务,用户可以导入本地知识、网络知识。系统会自动提取文件内容作为知识条目。
Path Parameters
dataset_id string required
知识库ID。
application/json
Request Body required
data_source_type enum required
数据源类型
target_path string
知识导入的目标路径
urls string[]
上传URL
document_pid string
知识导入的目标路径的ID
notion_page_ids string[]
知识导入的notion page的ID列表
segment_strategy object
Responses
- 200
- default
OK
application/json
Schema
Example (from schema)
Schema
job_id string
任务ID
data_source_type enum required
数据源类型
job_state enum
任务状态
creator string
创建者用户名
oss_temp_path string
OSS临时路径,上传本地知识的临时路径
err_msg string
错误信息
job_info object
document_info object[]
create_time date-time
创建时间
finish_time date-time
完成时间
target_path string
知识导入的目标路径
urls string[]
上传URL
document_pid string
知识导入的目标路径的ID
notion_page_ids string[]
知识导入的notion page的ID列表
{
"job_id": "string",
"data_source_type": 0,
"job_state": 0,
"creator": "string",
"oss_temp_path": "string",
"err_msg": "string",
"job_info": {
"total_document_size": 0,
"total_document_count": 0,
"succeed_document_size": 0,
"succeed_document_count": 0,
"succeed_token_count": 0,
"failed_document_size": 0,
"failed_document_count": 0
},
"document_info": [
{
"document_id": "string",
"display_name": "string",
"segment_count": 0,
"document_token": 0,
"document_state": 0,
"document_error": 0,
"document_size": 0
}
],
"create_time": "2025-06-25T02:32:24.029Z",
"finish_time": "2025-06-25T02:32:24.029Z",
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
]
}
Default error response
application/json
Schema
Example (from schema)
Schema
code int32
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
message string
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /v1/datasets/:dataset_id/jobs
Authorization
name: bearerAuthtype: httpscheme: bearer
Request
Request
curl / cURL
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
python / requests
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
go / native
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
nodejs / axios
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
ruby / Net::HTTP
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
csharp / RestSharp
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
php / cURL
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
java / OkHttp
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'
powershell / RestMethod
curl -L -X POST 'https://rag.cn-sh-01.sensecoreapi.cn/studio/rag/chat/v1/datasets/:dataset_id/jobs' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"data_source_type": 0,
"target_path": "string",
"urls": [
"string"
],
"document_pid": "string",
"notion_page_ids": [
"string"
],
"segment_strategy": {
"chunk_size": 0,
"chunk_overlap": 0,
"separators": [
"string"
]
}
}'