Update workflow¶
Modify the definition or configuration of an existing workflow. A successful request indicates that the modifications have been saved. When the definition or run configuration is changed, the service will resubmit the workflow definition but will not start a job.
PATCH $CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/{workflow_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 the workflow details and confirm the workflow to be modified. Prepare personal access token and target workspace ID with workflow update permissions.
Request body¶
Modification instructions
curl -X PATCH "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"description": "每日同步销售数据"
}'
Basic information
curl -X PATCH "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"name": "daily-import-v2",
"description": "每日同步销售数据",
"compute_resource_id": "compute-001"
}'
Scheduled trigger
curl -X PATCH "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"execution_mode": "cron",
"cron_expression": "0 2 * * *"
}'
Volume trigger
curl -X PATCH "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"execution_mode": "volume_trigger",
"volume_trigger": {
"volume_id": 1001,
"enabled": true
}
}'
Dynamic service
curl -X PATCH "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"execution_mode": "dynamic_service",
"dynamic_service": {
"service_name": "order-query-service",
"input_schema": "{\"type\":\"object\"}",
"output_schema": "{\"type\":\"object\"}"
}
}'
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The workflow ID to be updated. |
Request body
When explicitly submitting a dynamic service object, the JSON text of the input and output Schema must be provided at the same time. Only omitting the entire object will read the old version configuration. runtime_spec_json can be omitted, and oneshot is used when the result mode is empty.
Omitting notification configuration when redeploying may lose the original notification settings. When you need to retain notifications, submit the complete original configuration and do not fill in the request header with the desensitization value in the details.
The workflow generated by natural language cannot be arbitrarily modified through PATCH. Before modifying the DSL, runtime, compute resources, or deployment configuration, confirm whether the current source allows redeployment.
A valid expression is required when the updated run mode is cron. When omitted, the original expression can be used. Before filling in null or an empty string, check the saved value first. Both cannot be regarded as new expressions. The expression will be cleared when changing to non-cron mode.
Currently only submitting the final notification field may not complete the update. The request also needs to contain other updateable fields.
All fields are optional, but at least one updateable field must be submitted in the request. Do not pass runtime_context. Replace the workflow name, DSL, resource ID, and trigger configuration in the example with actual values.
Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID and $WORKFLOW_ID with actual values.
Basic information
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string or null |
No |
Workflow name. It must be nonempty when supplied. |
|
string or null |
No |
workflow description. |
|
string or null |
No |
Supplying |
|
string or null |
No |
Cron expression for scheduled triggering. A valid expression is required when the resulting execution mode is cron. Omit it to retain the current expression. |
|
string or null |
No |
The YAML text of the workflow DSL. It cannot be empty when passed in. |
|
string or null |
No |
The associated computing resource ID. |
|
object or null |
No |
Run-time input form configuration. |
|
string or null |
No |
Title text. |
|
string or null |
No |
Description of the current object. |
|
array of object or null |
No |
Field definition. |
|
string or null |
No |
Form field ID used to run input and layout associations. |
|
string or null |
No |
Show labels. |
|
string or null |
No |
Description of the current object. |
|
string or null |
No |
Input control type. |
|
string or null |
No |
JSON type. |
|
string or null |
No |
Model type label. |
|
boolean or null |
No |
Is it required? |
|
JSON value or null |
No |
Default value. |
|
boolean or null |
No |
Is there a default value? |
|
string or null |
No |
Enter the prompt. |
|
string or null |
No |
String matching pattern. |
|
string or null |
No |
Field path in run configuration. |
|
string or null |
No |
The block it belongs to. |
|
string or null |
No |
The group it belongs to. |
|
string or null |
No |
Value when enabled. |
|
string or null |
No |
value when closed. |
|
boolean or null |
No |
Whether to hide. |
|
boolean or null |
No |
Whether it is read-only. |
|
boolean or null |
No |
Whether it contains sensitive values. |
|
array of object or null |
No |
Optional. |
|
string or null |
No |
Show labels. |
|
JSON value or null |
No |
Value. |
|
string or null |
No |
Description of the current object. |
|
number or null |
No |
minimum value. |
|
number or null |
No |
maximum value. |
|
array of string or null |
No |
Allowed file types. |
|
string or null |
No |
Resource type. |
|
object or null |
No |
Show conditions. |
|
string or null |
No |
Form field ID used to run input and layout associations. |
|
JSON value or null |
No |
Value. |
|
string or object or null |
No |
Value binding position. |
|
string or null |
No |
The name of the node to which this field belongs. |
|
string or null |
No |
The positioning name of the node to which this field belongs. |
|
object or null |
No |
Enter form layout configuration at run time. |
|
string or null |
No |
The current resource version. |
|
array of object or null |
No |
Field grouping. |
|
string or null |
No |
Layout group ID. |
|
string or null |
No |
Title text. |
|
string or null |
No |
Display information. |
|
string or null |
No |
Node ID. |
|
array of string or null |
No |
Field ID within the group. |
|
object or null |
No |
Guidelines for using forms. |
|
string or null |
No |
Boot instructions. |
|
array of object or null |
No |
Path list. |
|
string or null |
No |
ID of the current object. |
|
string or null |
No |
Show labels. |
|
string or null |
No |
Description of the current object. |
|
array of string or null |
No |
Field ID within the group. |
|
array of object or null |
No |
Field grouping. |
|
string or null |
No |
ID of the current object. |
|
string or null |
No |
Show labels. |
|
array of string or null |
No |
List of path IDs. |
|
array of string or null |
No |
Field ID within the group. |
|
array of object or null |
No |
Field definition. |
|
string or null |
No |
Form field ID used to run input and layout associations. |
|
string or null |
No |
Associated roles. |
|
string or null |
No |
Additional explanation. |
|
string or null |
No |
Layout group ID. |
|
array of object or null |
No |
Is it fixed? |
|
string or null |
No |
Show labels. |
|
string or null |
No |
Value. |
|
object or null |
No |
Default value for input form at run time. Objects allow extended keys. |
|
object or null |
No |
Workflow design diagram configuration. Objects allow extended keys. |
|
object or null |
No |
Volume trigger configuration. |
|
integer or null |
No |
Volume ID. Required when a volume ID is not provided on the runtime input form. |
|
boolean or null |
No |
Whether to enable volume triggering. |
|
boolean or null |
No |
Whether to automatically distribute volume triggered runs. |
|
string or null |
No |
Variable JSON text used by volume triggers. |
|
integer or null |
No |
The maximum number of concurrent runs the volume can trigger. |
|
object or null |
No |
Dynamic service configuration. |
|
string or null |
No |
Dynamic service name. |
|
string or null |
Conditional |
JSON Schema text required when dynamic_service is explicitly supplied. Only the format validation supported by the current service is performed. |
|
string or null |
Conditional |
JSON Schema text required when dynamic_service is explicitly supplied. Only the format validation supported by the current service is performed. |
|
string or null |
No |
Result schema for dynamic services. |
|
string or null |
No |
JSON text for dynamic service runtime configuration. |
|
object or null |
No |
Final state notification configuration. |
|
string |
Yes |
type. |
|
string |
Yes |
Notification address. |
|
string or null |
No |
HTTP method. |
|
object or null |
No |
Notification request header. Objects allow extended keys. |
|
integer or null |
No |
Timeout seconds. |
|
JSON value |
No |
Worker ID. The value is empty string, |
|
JSON value |
No |
notification message. The value is empty string, |
|
array of string or null |
No |
Node notification status. |
|
array of string or null |
No |
Notify node ID. |
|
array |
Yes |
workflow notification status. |
Scheduled trigger
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Enable timed triggering when filling in |
|
string |
Conditional |
Cron expression for scheduled triggering. A valid expression is required when the resulting execution mode is cron. Omit it to retain the current expression. |
Volume trigger
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Enable volume triggering when filling in |
|
object |
No |
Volume trigger configuration. |
|
integer |
Conditional |
Volume ID. Required when a volume ID is not provided on the runtime input form. |
|
boolean |
No |
Whether to enable volume triggering. |
|
boolean |
No |
Whether to automatically distribute volume triggered runs. |
|
string |
No |
Variable JSON text used by volume triggers. |
|
integer |
No |
The maximum number of concurrent runs the volume can trigger. |
Dynamic service
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Supplying |
|
object |
No |
Dynamic service configuration. |
|
string |
No |
Dynamic service name. |
|
string |
Conditional |
JSON Schema text required when dynamic_service is explicitly supplied. Only the format validation supported by the current service is performed. |
|
string |
Conditional |
JSON Schema text required when dynamic_service is explicitly supplied. Only the format validation supported by the current service is performed. |
|
string |
No |
Result schema for dynamic services. |
|
string |
No |
JSON text for dynamic service runtime configuration. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"workflow": {
"id": "wf-001",
"name": "daily-import-v2",
"description": "每日同步销售数据",
"source_type": "manual_dsl",
"status": "ready",
"available_actions": [
"update",
"delete",
"run",
"pause"
],
"execution_mode": "cron",
"cron_expression": "0 2 * * *",
"latest_workflow_version_id": "ver-002",
"execution_summary": {
"total_executions": 8,
"active_executions": 0
},
"trigger_summary": {
"mode": "cron",
"configured": true,
"enabled": true,
"cron_expression": "0 2 * * *"
},
"updated_at": "2026-08-18T11:00:00Z",
"dsl_yaml": "workflow:\n name: daily-import-v2\n root: main\nroot:\n chain: []\n",
"default_values": {},
"created_at": "2026-10-14T00:00:00Z",
"definition_format": "dsl"
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
success code. |
|
string |
Response information. |
|
object |
The data returned by this operation. |
|
object |
MOWL workflow definition. |
|
string |
workflow ID. |
|
string |
workflow name. |
|
string |
workflow description. |
|
string |
workflow source type. The values are |
|
string |
Current status. The values are |
|
array of string |
Action hints for the current state. They do not indicate that the current user has passed permission checks. |
|
string |
Configured run mode. The values are |
|
string |
Cron expressions. Only returned when scheduled. |
|
string |
Draft ID. Returned when provided by the server. |
|
string |
Candidate ID. Returned when provided by the server. |
|
string |
Association ID. |
|
string |
Association ID. |
|
array of object |
Computing resource binding. |
|
string |
ID of the current object. |
|
string |
The name of the current object. |
|
boolean |
Whether this is a workflow-level binding. |
|
array of string |
Node name list. |
|
object |
Job summary. |
|
integer |
Total job count. |
|
integer |
Active job count. |
|
string |
Association ID. |
|
string |
Active job status: |
|
string |
Association ID. |
|
string |
Most recent job status: |
|
string |
time information. |
|
object |
Trigger configuration summary. |
|
string |
Scope or execution mode: |
|
boolean |
Has it been configured? |
|
boolean |
Whether to enable. |
|
integer |
Association ID. |
|
string |
Cron expressions. |
|
string |
Display information. |
|
string |
Creation time. In RFC 3339 format. |
|
string |
Last updated time. In RFC 3339 format. |
|
string |
workflow target. Returned when provided by the server. |
|
string |
planning model. Returned when provided by the server. |
|
string |
workflow DSL text. |
|
object |
MOWL workflow definition objects allow extended keys. |
|
string |
Define the format. The values are |
|
object |
Run the form. |
|
string |
Title text. |
|
string |
Description of the current object. |
|
array of object |
Field definition. |
|
string |
Form field ID used to run input and layout associations. |
|
string |
Show labels. |
|
string |
Description of the current object. |
|
string |
Input control type. |
|
string |
JSON type. |
|
string |
Model type label. |
|
boolean |
Is it required? |
|
JSON value |
Default value. |
|
boolean |
Is there a default value? |
|
string |
Enter the prompt. |
|
string |
String matching pattern. |
|
string |
Field path in run configuration. |
|
string |
The block it belongs to. |
|
string |
The group it belongs to. |
|
string |
Value when enabled. |
|
string |
value when closed. |
|
boolean |
Whether to hide. |
|
boolean |
Whether it is read-only. |
|
boolean |
Whether it contains sensitive values. |
|
array of object |
Optional. |
|
string |
Show labels. |
|
JSON value |
Value. |
|
string |
Description of the current object. |
|
number |
minimum value. |
|
number |
maximum value. |
|
array of string |
Allowed file types. |
|
string |
Resource type. |
|
object |
Show conditions. |
|
string |
Form field ID used to run input and layout associations. |
|
JSON value |
Value. |
|
string or object or null |
Value binding position. |
|
string |
The name of the node to which this field belongs. |
|
string |
The positioning name of the node to which this field belongs. |
|
object |
Run the layout. |
|
string |
The current resource version. |
|
array of object or null |
Field grouping. |
|
string |
Layout group ID. |
|
string |
Title text. |
|
string |
Display information. |
|
string |
Node ID. |
|
array of string or null |
Field ID within the group. |
|
object |
Guidelines for using forms. |
|
string |
Boot instructions. |
|
array of object |
Path list. |
|
string |
ID of the current object. |
|
string |
Show labels. |
|
string |
Description of the current object. |
|
array of string or null |
Field ID within the group. |
|
array of object |
Field grouping. |
|
string |
ID of the current object. |
|
string |
Show labels. |
|
array of string or null |
List of path IDs. |
|
array of string or null |
Field ID within the group. |
|
array of object or null |
Field definition. |
|
string |
Form field ID used to run input and layout associations. |
|
string |
Associated roles. |
|
string |
Additional explanation. |
|
string |
Layout group ID. |
|
array of object |
Is it fixed? |
|
string |
Show labels. |
|
string |
Value. |
|
object |
The default running value object allows extended keys. |
|
object |
Schematic objects allow extended keys. |
|
object |
Final state notification configuration objects allow extended keys. |
|
string |
Workflow definition ID. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Error description. |
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
400 |
|
Invalid request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
403 |
|
The current identity or active role does not have permission for this operation. |
Use an authorized identity or contact an administrator to grant access. |
404 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
409 |
|
Conflict in resource state, request payload, or concurrent modification. |
Re-read the current state and version, then handle according to the latest result. |
500 |
|
Internal processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |