Create task¶
Create an export task to write files or processing results to the target connector. A successful response indicates that the task has been accepted. Please use the task ID to continue viewing the actual processing status.
POST $CLOUDSIGMA_API_BASE/export/task/create
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
Prepare personal access token and target workspace ID that can access the target workspace.
Select the file to be exported.
Prepare the ID and full path of at least one file.
Select a target connector that supports exporting.
Prepare the corresponding export configuration according to the target type. OmniFabric targets require databases, tables, and column mappings. The object storage target requires a path and compression method.
Request body¶
Replace the file information in $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $CONNECTOR_ID and examples with actual values. Only one target configuration object is filled in per request.
OmniFabric target
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/create" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"task_name": "export-orders",
"creator": "data-engineer",
"connector_id": "$CONNECTOR_ID",
"connector_name": "target-mo",
"type": 3,
"config": {
"mo_config": {
"database_name": "analytics",
"table_name": "orders",
"new_table": true,
"duplicated_strategy": 3,
"column": {
"export_column": [{
"source_column": "content",
"mapping_column": "content"
}],
"combine_column": []
}
}
},
"files": [{
"file_id": "file_01",
"ref_file_id": "raw-file_01",
"parsed_file_id": "parsed-file_01",
"full_path": ["volume_01", "orders.csv"],
"is_raw": false
}]
}
EOF
Object storage target
OSS uses type as 4, and standard S3 uses 5. Fill in s3_config for both.
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/create" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"task_name": "export-to-s3",
"creator": "data-engineer",
"connector_id": "$CONNECTOR_ID",
"connector_name": "target-s3",
"type": 5,
"config": {
"s3_config": {
"path": "exports/",
"need_compress": true,
"compress_method": "gzip"
}
},
"files": [{
"file_id": "file_01",
"full_path": ["volume_01", "orders.csv"],
"is_raw": true
}]
}
EOF
Dify knowledge base goal
The Dify knowledge base target can be used when calling the API directly. The current creation page does not provide this target entry.
curl -X POST "$CLOUDSIGMA_API_BASE/export/task/create" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"task_name": "export-to-dify",
"creator": "data-engineer",
"connector_id": "$CONNECTOR_ID",
"connector_name": "target-dify",
"type": 6,
"config": {
"dify_config": {
"dataset_id": "dataset-001",
"dataset_name": "support-kb",
"embedding_model": "text-embedding-model"
}
},
"files": [{
"file_id": "file_01",
"full_path": ["volume_01", "orders.csv"],
"is_raw": false
}]
}
EOF
OmniFabric target
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Non-empty name. Leading and trailing whitespace will be removed. |
|
string |
No |
Creator ID. |
|
string |
Yes |
Target connector ID. |
|
string |
Yes |
Non-empty name. Leading and trailing whitespace will be removed. |
|
integer |
Yes |
The OmniFabric target uses |
|
object |
Yes |
target configuration. In this scenario, only fill in |
|
object |
Yes |
OmniFabric target configuration. |
|
string |
No |
Target database name. |
|
string |
No |
Target table name. |
|
boolean |
No |
Whether to create a new target table. |
|
integer |
No |
Duplicate data processing method: |
|
object |
No |
Export column configuration. |
|
array of object |
No |
Mapping of source columns and target columns. |
|
string |
No |
Source column name. |
|
string |
No |
Target column name. |
|
array of string |
No |
The source column to be merged. Pass empty array when not merging. |
|
array of object |
Yes |
Files to be exported, at least one item. |
|
string |
Yes |
Source file ID. |
|
string |
No |
The associated original file ID. |
|
string |
No |
The associated parsed product file ID. |
|
array of string |
Yes |
The full path to the source file. Each document is required. |
|
boolean |
No |
|
|
boolean |
No |
Whether to merge the title into the body when exporting the parsed content. |
|
object |
Yes |
Object storage target configuration. |
|
string |
No |
The destination path within the bucket. |
|
boolean |
No |
Whether to compress the exported content. |
|
string |
No |
Compression method. |
|
object |
Yes |
Dify knowledge base target configuration. |
|
string |
No |
Target knowledge base ID. |
|
string |
No |
The name of the knowledge base saved to the task. |
|
string |
No |
The embedded model identifier used by the knowledge base. |
creator is only for display, the actual execution identity is the current authenticated user.
The service only saves defined configuration fields, such as mo_config, dify_config, and s3_config, and unknown fields are discarded. locale uses the trusted language settings of the current request.
Supports export to OmniFabric, OSS, S3 and Dify. Successful creation does not guarantee that the type matches the configuration. When the target configuration is missing or mismatched, an error may not be returned until the file is processed.
The estimated size of the compressed export cannot exceed 100 GiB. The original file is calculated based on the actual size, and the parsed result is estimated based on 10 MiB per file.
A maximum of 10 files can be processed simultaneously, with a maximum of 3 attempts per file. Do not retry when there is insufficient permission, the resource does not exist, or the input is invalid. Some data may have been written to an external database, object store, or Dify before the task failed.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"id": "export-task-123",
"name": "export-orders",
"connector_name": "target-mo",
"type": 3,
"status": 1,
"export_source": [
[
"volume_01",
"orders.csv"
]
],
"create_time": "2026-08-28T10:00:00.000000+0000",
"end_time": null,
"fileSuccess": 0,
"fileFail": 0
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
Create a new task. |
|
string |
Task ID. |
|
string |
Task name. |
|
string |
Target connector name. |
|
integer |
Export target type. |
|
integer |
Task status. |
|
array of string |
A collection of source file paths. |
|
string or null |
Creation time. |
|
string or null |
end time. |
|
integer |
The number of files successfully exported. |
|
integer |
The number of files that failed to export. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |