Update automated tasks¶
Partially update the configuration of the automation task. Fields not provided remain unchanged.
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-automation-tasks/{automation_task_id}
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. First Query automation task details confirm the current configuration of the task and obtain the task ID. Prepare a personal access token and target workspace ID that can access the target workspace.
Request body¶
Replace $WORKSPACE_ID, $TASK_ID, $CLOUDSIGMA_API_KEY in the example with actual values.
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-automation-tasks/$TASK_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"status": "disabled"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
Automation task ID. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string or null |
No |
Task name and description. |
|
string or null |
No |
Task name and description. |
|
string or null |
No |
agent source workspace. Current workspace or system, not limited when filtering is omitted. |
|
string or null |
No |
The workspace and agent ID to which the agent belongs. agentworkspace can only be the current workspace or system workspace. |
|
string or null |
No |
Model name and LLM backend ID. |
|
integer or null |
No |
Model name and LLM backend ID. |
|
string or null |
No |
Fixed instructions used for each run. |
|
object or null |
No |
Trigger configuration. |
|
string |
When the object is provided |
processing mode. Values: |
|
string |
No |
Cron expressions. |
|
string |
No |
How to handle results. |
|
object or null |
No |
Input field structure. |
|
object or null |
No |
Configuration. |
|
object or null |
No |
Certification policies and references to tools, operations, and approval policies. |
|
object or null |
No |
Structured output constraints. |
|
string or null |
No |
Task status. Values: |
|
object or null |
No |
Label and annotation key-value pairs. |
|
object or null |
No |
Label and annotation key-value pairs. |
The workspace, operator, time and run summary are maintained by the server and cannot be specified in the request. trigger.service_name is generated by the server.
After the API is deployed, read the call information from api_summary. This request does not support configuring policy references that have not yet been accessed.
When updating, fill in null to retain the original value, and fill in {} to clear the object. trigger will also be replaced as a whole.
version is only added when the definition changes. Modification status, labels, annotations, or empty update will not increase the definition version. The archived task cannot be restored, and mode restrictions must still be met to convert the callback mode.
This interface cannot clear the original auth_policy, so the API task cannot be changed to cron. Filling in null will retain the authentication policy.
Successful response¶
{
"code": 0,
"data": {
"id": "task_01",
"workspace_id": "ws_01",
"agent_workspace_id": "",
"name": "",
"agent_id": "",
"instruction_text": "",
"trigger": {
"mode": "cron"
},
"status": "disabled",
"version": 2,
"execution": {
"type": "agent",
"system_flow_id": ""
},
"created_at": "2026-08-21T07:00:00Z",
"updated_at": "2026-08-21T07:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Task ID and workspace ID. |
|
string |
Task ID and workspace ID. |
|
string |
agent source workspace. Current workspace or system, not limited when filtering is omitted. |
|
string |
Name. |
|
string |
Description. |
|
string |
agent ID. |
|
string |
model. |
|
integer |
Model backend ID. |
|
string |
Task instructions. |
|
object |
Updated triggering, authentication and output configuration. Does not return if not set. |
|
string |
processing mode. Values: |
|
string |
Cron expressions. |
|
string |
How to handle results. |
|
string |
Service name. |
|
object or null |
Input field structure. |
|
object or null |
Configuration. |
|
object |
Updated triggering, authentication and output configuration. Does not return if not set. |
|
object |
Updated triggering, authentication and output configuration. Does not return if not set. |
|
string |
Updated status and task version. Values: |
|
integer |
Updated status and task version. |
|
string |
Next trigger time. RFC 3339 time. |
|
object |
Summary of API calls. |
|
object |
Automated call configuration. |
|
string |
HTTP method. |
|
string |
path. |
|
object |
Request body example. |
|
string |
Service name. |
|
object or null |
content. |
|
object |
Summary of recent runs. |
|
string |
Run ID. |
|
string |
status. Values: |
|
string |
Trigger type. Values: |
|
integer |
Automated task version. |
|
string |
Output verification status. |
|
string |
Creation time. |
|
string |
Update time. |
|
string |
Completion time. |
|
string |
error code. |
|
string |
error message. |
|
object |
Tag mapping. |
|
object |
Annotation mapping. |
|
object |
Updated task execution plan. |
|
string |
type. Value: |
|
string |
System process ID. |
|
object or null |
Parameter definition. |
|
array of object |
Planning steps. |
|
string |
logo. |
|
string |
Worker ID. |
|
string |
Work item ID. |
|
string |
operation. |
|
string |
Number of repetitions. |
|
object or null |
Parameter definition. |
|
string |
Creation time. RFC 3339 time. |
|
string |
Last updated, using RFC 3339 format. RFC 3339 time. |
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
The request body, workspace scope, trigger configuration, authentication policy, or status fields are invalid. Recommendation: Check the configuration corresponding to JSON and triggering methods. |
|
|
Valid identity credentials are missing. Recommendation: Check the API Key. |
|
|
The current identity has not been verified for workspace access and valid roles. Recommendation: Use an identity and a valid role with workspace access. |
|
|
The task or updated target agent does not exist. Recommendation: Check the task and agent identification. |
|
|
The update conflicts with the current state or concurrent version of the task. Suggestion: After refreshing the task details, resubmit the update based on the current version. |
|
|
Execution plan, workflow or task services are temporarily unavailable. Suggestion: Check the current status first. Do not automatically resubmit. |