Update task¶
Update a paused import task. The interface will only modify the fields provided in the request.
POST $CLOUDSIGMA_API_BASE/task/update
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First, Query task details confirms that the task has been suspended; unsuspended tasks cannot be updated.
Set the operation-specific values used in the request:
$TASK_ID: Task ID to be updated.
Request¶
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 '{
"task_id": "'$TASK_ID'",
"name": "import_orders_v2",
"load_mode_config": {
"load_interval_type": 4
}
}'
Request body
Field |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The ID of the import task to update. |
|
string |
No |
The new task name; an empty string will not update the name. |
|
object |
No |
Load mode for file import. When this object is provided, the load plan is updated with the fields in it. |
|
integer |
No |
Load interval type: |
|
integer |
No |
Period parameter; represents the execution hour in days. |
|
object |
No |
File filter configuration; providing this object replaces the current file filter configuration entirely. |
|
string[] |
No |
Filename glob pattern. |
|
integer |
No |
Minimum file size in bytes. |
|
integer |
No |
Maximum file size in bytes. |
|
integer |
No |
Minimum creation time, using a Unix timestamp. |
|
integer |
No |
Maximum creation time, using a Unix timestamp. |
|
integer[] |
No |
File type filter code. |
|
string |
No |
File path filter regular expression. |
|
string[] |
No |
List of source file URIs; replacing the current URI list entirely when this field is provided. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Successful response¶
Returns 200 on success and data is null.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
This interface does not return the updated task; please query the details again to confirm. |
Error response¶
{
"code": "ErrForbidden",
"msg": "permission denied",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The request body is invalid, or the task is not in the paused state. |
Fix JSON and pause the task first. |
|
|
The caller does not have permission to update the task. |
Check workspace and object authorization. |
|
|
The service is temporarily unable to complete the authorization check. |
Try again later. |
|
|
The service failed to update the task. |
Check both HTTP status and |
Follow-up operations¶
This interface does not return the complete task object. Use the same task ID Query task details to confirm the update result.