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.
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
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.
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.
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 |
|---|---|---|---|
|
string |
Yes |
Import task ID to update. |
|
string |
No |
New task name. An empty string will not update the name. |
|
object |
No |
New file import cycle. |
|
integer |
No |
Import cycle type. |
|
object |
No |
File filtering configuration. |
|
array of string |
No |
Filename glob pattern. |
|
integer (integer array) |
No |
File type filter code. |
|
string |
No |
File path filter regular expression. |
|
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¶
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Updated tasks are not returned. |
Error response¶
{
"code": "ErrServer",
"msg": "task must be paused before update",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |