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.

HTTP
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.

  1. Prepare personal access token and target workspace ID that can access the target workspace.

  2. Select the file to be exported.

  3. Prepare the ID and full path of at least one file.

  4. Select a target connector that supports exporting.

  5. 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

Shell
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.

Shell
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.

Shell
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

task_name

string

Yes

Non-empty name. Leading and trailing whitespace will be removed.

creator

string

No

Creator ID.

connector_id

string

Yes

Target connector ID.

connector_name

string

Yes

Non-empty name. Leading and trailing whitespace will be removed.

type

integer

Yes

The OmniFabric target uses 3. The standard S3 target uses 5. The Dify knowledge base target uses 6.

config

object

Yes

target configuration. In this scenario, only fill in mo_config. target configuration. In this scenario, only fill in s3_config. target configuration. In this scenario, only fill in dify_config.

config.mo_config

object

Yes

OmniFabric target configuration.

config.mo_config.database_name

string

No

Target database name.

config.mo_config.table_name

string

No

Target table name.

config.mo_config.new_table

boolean

No

Whether to create a new target table.

config.mo_config.duplicated_strategy

integer

No

Duplicate data processing method: 1 overwrite, 2 skip, 3 retain.

config.mo_config.column

object

No

Export column configuration.

config.mo_config.column.export_column

array of object

No

Mapping of source columns and target columns.

config.mo_config.column.export_column[].source_column

string

No

Source column name.

config.mo_config.column.export_column[].mapping_column

string

No

Target column name.

config.mo_config.column.combine_column

array of string

No

The source column to be merged. Pass empty array when not merging.

files

array of object

Yes

Files to be exported, at least one item.

files[].file_id

string

Yes

Source file ID.

files[].ref_file_id

string

No

The associated original file ID.

files[].parsed_file_id

string

No

The associated parsed product file ID.

files[].full_path

array of string

Yes

The full path to the source file. Each document is required.

files[].is_raw

boolean

No

false indicates the export processing result. true means exporting the original file.

config.merge_title_to_text

boolean

No

Whether to merge the title into the body when exporting the parsed content.

config.s3_config

object

Yes

Object storage target configuration.

config.s3_config.path

string

No

The destination path within the bucket.

config.s3_config.need_compress

boolean

No

Whether to compress the exported content.

config.s3_config.compress_method

string

No

Compression method.

config.dify_config

object

Yes

Dify knowledge base target configuration.

config.dify_config.dataset_id

string

No

Target knowledge base ID.

config.dify_config.dataset_name

string

No

The name of the knowledge base saved to the task.

config.dify_config.embedding_model

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

JSON
{
  "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

code

string

OK on success.

msg

string

OK on success.

data

object

Create a new task.

data.id

string

Task ID.

data.name

string

Task name.

data.connector_name

string

Target connector name.

data.type

integer

Export target type.

data.status

integer

Task status.

data.export_source

array of string

A collection of source file paths.

data.create_time

string or null

Creation time.

data.end_time

string or null

end time.

data.fileSuccess

integer

The number of files successfully exported.

data.fileFail

integer

The number of files that failed to export.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

Last updated on