Update task

Update a paused import task. The interface only modifies the fields provided in the request. File filtering configuration and source URI replace the current value with the requested value.

HTTP
POST $CLOUDSIGMA_API_BASE/task/update

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, target workspace ID and task ID that can access the target workspace. First Query the import task details to confirm that the task has been suspended.

Request body

Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $TASK_ID with actual values. Fields from the following scenarios can be combined per request. Only the keys that need to be updated are passed in the same object.

Modify task name and import cycle

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/task/update" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d "{\n    \\"task_id\\": \\"$TASK_ID\\",\n    \\"name\\": \\"import_orders_v2\\",\n    \\"load_mode_config\\": {\n      \\"load_interval_type\\": 4\n    }\n  }"

Modify file filter conditions

When file_filter_config is provided, the current file filtering configuration is replaced.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/task/update" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d "{\n    \\"task_id\\": \\"$TASK_ID\\",\n    \\"file_filter_config\\": {\n      \\"filename_globs\\": [\"*.csv\"],\n      \\"file_types\\": [1],\n      \\"path_regex\\": \"^orders/\"\n    }\n  }"

Modify source files

Providing uris replaces the current list of source URIs.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/task/update" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d "{\n    \\"task_id\\": \\"$TASK_ID\\",\n    \\"uris\\": [\"s3://orders/2026-08.csv\"]\n  }"

Modify task name and import cycle

Parameter

Type

Required

Description

task_id

string

Yes

Import task ID to update.

name

string

No

New task name. An empty string will not update the name.

load_mode_config

object

No

New file import cycle.

load_mode_config.load_interval_type

integer

No

Import cycle type. 4 in the example represents a one-time import.

file_filter_config

object

No

File filtering configuration.

file_filter_config.filename_globs

array of string

No

Filename glob pattern.

file_filter_config.file_types

integer (integer array)

No

File type filter code.

file_filter_config.path_regex

string

No

File path filter regular expression.

uris

array of string

No

List of source file URIs.

Keep the original list when uris is omitted or null is filled in. Clear it when filling in []. After clearing, save it as JSON null.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

Updated tasks are not returned.

Error response

JSON
{
  "code": "ErrServer",
  "msg": "task must be paused before update",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

Last updated on