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.

HTTP
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

Shell
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

Shell
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

Shell
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

Shell
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

Shell
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

workflow_id

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

name

string or null

No

Workflow name. It must be nonempty when supplied.

description

string or null

No

workflow description.

execution_mode

string or null

No

Supplying dynamic_service enables a dynamic service.

cron_expression

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.

dsl_yaml

string or null

No

The YAML text of the workflow DSL. It cannot be empty when passed in.

compute_resource_id

string or null

No

The associated computing resource ID.

runtime_fields

object or null

No

Run-time input form configuration.

runtime_fields.title

string or null

No

Title text.

runtime_fields.description

string or null

No

Description of the current object.

runtime_fields.fields

array of object or null

No

Field definition.

runtime_fields.fields[].field_id

string or null

No

Form field ID used to run input and layout associations.

runtime_fields.fields[].label

string or null

No

Show labels.

runtime_fields.fields[].description

string or null

No

Description of the current object.

runtime_fields.fields[].widget

string or null

No

Input control type.

runtime_fields.fields[].json_type

string or null

No

JSON type.

runtime_fields.fields[].model_type

string or null

No

Model type label.

runtime_fields.fields[].required

boolean or null

No

Is it required?

runtime_fields.fields[].default

JSON value or null

No

Default value.

runtime_fields.fields[].has_default

boolean or null

No

Is there a default value?

runtime_fields.fields[].placeholder

string or null

No

Enter the prompt.

runtime_fields.fields[].pattern

string or null

No

String matching pattern.

runtime_fields.fields[].runtime_config_path

string or null

No

Field path in run configuration.

runtime_fields.fields[].section

string or null

No

The block it belongs to.

runtime_fields.fields[].group

string or null

No

The group it belongs to.

runtime_fields.fields[].on_value

string or null

No

Value when enabled.

runtime_fields.fields[].off_value

string or null

No

value when closed.

runtime_fields.fields[].hidden

boolean or null

No

Whether to hide.

runtime_fields.fields[].read_only

boolean or null

No

Whether it is read-only.

runtime_fields.fields[].sensitive

boolean or null

No

Whether it contains sensitive values.

runtime_fields.fields[].options

array of object or null

No

Optional.

runtime_fields.fields[].options[].label

string or null

No

Show labels.

runtime_fields.fields[].options[].value

JSON value or null

No

Value.

runtime_fields.fields[].options[].description

string or null

No

Description of the current object.

runtime_fields.fields[].min

number or null

No

minimum value.

runtime_fields.fields[].max

number or null

No

maximum value.

runtime_fields.fields[].accept

array of string or null

No

Allowed file types.

runtime_fields.fields[].resource_type

string or null

No

Resource type.

runtime_fields.fields[].visible_when

object or null

No

Show conditions.

runtime_fields.fields[].visible_when.field_id

string or null

No

Form field ID used to run input and layout associations.

runtime_fields.fields[].visible_when.value

JSON value or null

No

Value.

runtime_fields.fields[].bind_to

string or object or null

No

Value binding position.

runtime_fields.fields[].owner_node_name

string or null

No

The name of the node to which this field belongs.

runtime_fields.fields[].owner_node_id

string or null

No

The positioning name of the node to which this field belongs.

runtime_layout

object or null

No

Enter form layout configuration at run time.

runtime_layout.version

string or null

No

The current resource version.

runtime_layout.groups

array of object or null

No

Field grouping.

runtime_layout.groups[].group_id

string or null

No

Layout group ID.

runtime_layout.groups[].title

string or null

No

Title text.

runtime_layout.groups[].node_name

string or null

No

Display information.

runtime_layout.groups[].node_id

string or null

No

Node ID.

runtime_layout.groups[].field_ids

array of string or null

No

Field ID within the group.

runtime_layout.guide

object or null

No

Guidelines for using forms.

runtime_layout.guide.lead

string or null

No

Boot instructions.

runtime_layout.guide.paths

array of object or null

No

Path list.

runtime_layout.guide.paths[].id

string or null

No

ID of the current object.

runtime_layout.guide.paths[].label

string or null

No

Show labels.

runtime_layout.guide.paths[].description

string or null

No

Description of the current object.

runtime_layout.guide.paths[].field_ids

array of string or null

No

Field ID within the group.

runtime_layout.guide.groups

array of object or null

No

Field grouping.

runtime_layout.guide.groups[].id

string or null

No

ID of the current object.

runtime_layout.guide.groups[].label

string or null

No

Show labels.

runtime_layout.guide.groups[].path_ids

array of string or null

No

List of path IDs.

runtime_layout.guide.groups[].field_ids

array of string or null

No

Field ID within the group.

runtime_layout.guide.fields

array of object or null

No

Field definition.

runtime_layout.guide.fields[].field_id

string or null

No

Form field ID used to run input and layout associations.

runtime_layout.guide.fields[].role

string or null

No

Associated roles.

runtime_layout.guide.fields[].note

string or null

No

Additional explanation.

runtime_layout.guide.fields[].group_id

string or null

No

Layout group ID.

runtime_layout.guide.fixed

array of object or null

No

Is it fixed?

runtime_layout.guide.fixed[].label

string or null

No

Show labels.

runtime_layout.guide.fixed[].value

string or null

No

Value.

default_values

object or null

No

Default value for input form at run time. Objects allow extended keys.

design_graph

object or null

No

Workflow design diagram configuration. Objects allow extended keys.

volume_trigger

object or null

No

Volume trigger configuration.

volume_trigger.volume_id

integer or null

No

Volume ID. Required when a volume ID is not provided on the runtime input form.

volume_trigger.enabled

boolean or null

No

Whether to enable volume triggering.

volume_trigger.auto_dispatch_enabled

boolean or null

No

Whether to automatically distribute volume triggered runs.

volume_trigger.vars_json

string or null

No

Variable JSON text used by volume triggers.

volume_trigger.max_concurrency

integer or null

No

The maximum number of concurrent runs the volume can trigger.

dynamic_service

object or null

No

Dynamic service configuration.

dynamic_service.service_name

string or null

No

Dynamic service name.

dynamic_service.input_schema

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.

dynamic_service.output_schema

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.

dynamic_service.result_mode

string or null

No

Result schema for dynamic services.

dynamic_service.runtime_spec_json

string or null

No

JSON text for dynamic service runtime configuration.

notification_config

object or null

No

Final state notification configuration.

notification_config.type

string

Yes

type.

notification_config.url

string

Yes

Notification address.

notification_config.method

string or null

No

HTTP method.

notification_config.headers

object or null

No

Notification request header. Objects allow extended keys.

notification_config.timeout

integer or null

No

Timeout seconds.

notification_config.worker_id

JSON value

No

Worker ID. The value is empty string, null.

notification_config.message

JSON value

No

notification message. The value is empty string, null.

notification_config.notify_node_states

array of string or null

No

Node notification status.

notification_config.notify_node_ids

array of string or null

No

Notify node ID.

notification_config.notify_workflow_states

array

Yes

workflow notification status.

Scheduled trigger

Field

Type

Required

Description

execution_mode

string

No

Enable timed triggering when filling in cron.

cron_expression

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

execution_mode

string

No

Enable volume triggering when filling in volume_trigger.

volume_trigger

object

No

Volume trigger configuration.

volume_trigger.volume_id

integer

Conditional

Volume ID. Required when a volume ID is not provided on the runtime input form.

volume_trigger.enabled

boolean

No

Whether to enable volume triggering.

volume_trigger.auto_dispatch_enabled

boolean

No

Whether to automatically distribute volume triggered runs.

volume_trigger.vars_json

string

No

Variable JSON text used by volume triggers.

volume_trigger.max_concurrency

integer

No

The maximum number of concurrent runs the volume can trigger.

Dynamic service

Field

Type

Required

Description

execution_mode

string

No

Supplying dynamic_service enables a dynamic service.

dynamic_service

object

No

Dynamic service configuration.

dynamic_service.service_name

string

No

Dynamic service name.

dynamic_service.input_schema

string

Conditional

JSON Schema text required when dynamic_service is explicitly supplied. Only the format validation supported by the current service is performed.

dynamic_service.output_schema

string

Conditional

JSON Schema text required when dynamic_service is explicitly supplied. Only the format validation supported by the current service is performed.

dynamic_service.result_mode

string

No

Result schema for dynamic services.

dynamic_service.runtime_spec_json

string

No

JSON text for dynamic service runtime configuration.

Successful response

JSON
{
  "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

code

string

success code.

msg

string

Response information.

data

object

The data returned by this operation.

data.workflow

object

MOWL workflow definition.

data.workflow.id

string

workflow ID.

data.workflow.name

string

workflow name.

data.workflow.description

string

workflow description.

data.workflow.source_type

string

workflow source type. The values are nl2dsl, manual_dsl, manual_mowl, system, agent_automation_task

data.workflow.status

string

Current status. The values are ready, disabled, paused

data.workflow.available_actions

array of string

Action hints for the current state. They do not indicate that the current user has passed permission checks.

data.workflow.execution_mode

string

Configured run mode. The values are one_shot, volume_trigger, cron, dynamic_service, task_by_version

data.workflow.cron_expression

string

Cron expressions. Only returned when scheduled.

data.workflow.draft_id

string

Draft ID. Returned when provided by the server.

data.workflow.candidate_id

string

Candidate ID. Returned when provided by the server.

data.workflow.latest_workflow_version_id

string

Association ID.

data.workflow.compute_resource_id

string

Association ID.

data.workflow.compute_resource_bindings

array of object

Computing resource binding.

data.workflow.compute_resource_bindings[].id

string

ID of the current object.

data.workflow.compute_resource_bindings[].name

string

The name of the current object.

data.workflow.compute_resource_bindings[].workflow_level

boolean

Whether this is a workflow-level binding.

data.workflow.compute_resource_bindings[].node_names

array of string

Node name list.

data.workflow.execution_summary

object

Job summary.

data.workflow.execution_summary.total_executions

integer

Total job count.

data.workflow.execution_summary.active_executions

integer

Active job count.

data.workflow.execution_summary.active_execution_id

string

Association ID.

data.workflow.execution_summary.active_execution_status

string

Active job status: preparing, waiting, pending, triggered, running, completed, failed, cancelled, submitted, scheduled, paused, canceled, success, succeeded, queued, cancelling, canceling.

data.workflow.execution_summary.latest_execution_id

string

Association ID.

data.workflow.execution_summary.latest_execution_status

string

Most recent job status: preparing, waiting, pending, triggered, running, completed, failed, cancelled, submitted, scheduled, paused, canceled, success, succeeded, queued, cancelling, canceling.

data.workflow.execution_summary.latest_execution_at

string

time information.

data.workflow.trigger_summary

object

Trigger configuration summary.

data.workflow.trigger_summary.mode

string

Scope or execution mode: one_shot, volume_trigger, cron, dynamic_service, task_by_version.

data.workflow.trigger_summary.configured

boolean

Has it been configured?

data.workflow.trigger_summary.enabled

boolean

Whether to enable.

data.workflow.trigger_summary.volume_id

integer

Association ID.

data.workflow.trigger_summary.cron_expression

string

Cron expressions.

data.workflow.trigger_summary.service_name

string

Display information.

data.workflow.created_at

string

Creation time. In RFC 3339 format.

data.workflow.updated_at

string

Last updated time. In RFC 3339 format.

data.workflow.goal

string

workflow target. Returned when provided by the server.

data.workflow.planner_model

string

planning model. Returned when provided by the server.

data.workflow.dsl_yaml

string

workflow DSL text.

data.workflow.workflow

object

MOWL workflow definition objects allow extended keys.

data.workflow.definition_format

string

Define the format. The values ​​are dsl, mowl, and empty string.

data.workflow.runtime_fields

object

Run the form.

data.workflow.runtime_fields.title

string

Title text.

data.workflow.runtime_fields.description

string

Description of the current object.

data.workflow.runtime_fields.fields

array of object

Field definition.

data.workflow.runtime_fields.fields[].field_id

string

Form field ID used to run input and layout associations.

data.workflow.runtime_fields.fields[].label

string

Show labels.

data.workflow.runtime_fields.fields[].description

string

Description of the current object.

data.workflow.runtime_fields.fields[].widget

string

Input control type.

data.workflow.runtime_fields.fields[].json_type

string

JSON type.

data.workflow.runtime_fields.fields[].model_type

string

Model type label.

data.workflow.runtime_fields.fields[].required

boolean

Is it required?

data.workflow.runtime_fields.fields[].default

JSON value

Default value.

data.workflow.runtime_fields.fields[].has_default

boolean

Is there a default value?

data.workflow.runtime_fields.fields[].placeholder

string

Enter the prompt.

data.workflow.runtime_fields.fields[].pattern

string

String matching pattern.

data.workflow.runtime_fields.fields[].runtime_config_path

string

Field path in run configuration.

data.workflow.runtime_fields.fields[].section

string

The block it belongs to.

data.workflow.runtime_fields.fields[].group

string

The group it belongs to.

data.workflow.runtime_fields.fields[].on_value

string

Value when enabled.

data.workflow.runtime_fields.fields[].off_value

string

value when closed.

data.workflow.runtime_fields.fields[].hidden

boolean

Whether to hide.

data.workflow.runtime_fields.fields[].read_only

boolean

Whether it is read-only.

data.workflow.runtime_fields.fields[].sensitive

boolean

Whether it contains sensitive values.

data.workflow.runtime_fields.fields[].options

array of object

Optional.

data.workflow.runtime_fields.fields[].options[].label

string

Show labels.

data.workflow.runtime_fields.fields[].options[].value

JSON value

Value.

data.workflow.runtime_fields.fields[].options[].description

string

Description of the current object.

data.workflow.runtime_fields.fields[].min

number

minimum value.

data.workflow.runtime_fields.fields[].max

number

maximum value.

data.workflow.runtime_fields.fields[].accept

array of string

Allowed file types.

data.workflow.runtime_fields.fields[].resource_type

string

Resource type.

data.workflow.runtime_fields.fields[].visible_when

object

Show conditions.

data.workflow.runtime_fields.fields[].visible_when.field_id

string

Form field ID used to run input and layout associations.

data.workflow.runtime_fields.fields[].visible_when.value

JSON value

Value.

data.workflow.runtime_fields.fields[].bind_to

string or object or null

Value binding position.

data.workflow.runtime_fields.fields[].owner_node_name

string

The name of the node to which this field belongs.

data.workflow.runtime_fields.fields[].owner_node_id

string

The positioning name of the node to which this field belongs.

data.workflow.runtime_layout

object

Run the layout.

data.workflow.runtime_layout.version

string

The current resource version.

data.workflow.runtime_layout.groups

array of object or null

Field grouping.

data.workflow.runtime_layout.groups[].group_id

string

Layout group ID.

data.workflow.runtime_layout.groups[].title

string

Title text.

data.workflow.runtime_layout.groups[].node_name

string

Display information.

data.workflow.runtime_layout.groups[].node_id

string

Node ID.

data.workflow.runtime_layout.groups[].field_ids

array of string or null

Field ID within the group.

data.workflow.runtime_layout.guide

object

Guidelines for using forms.

data.workflow.runtime_layout.guide.lead

string

Boot instructions.

data.workflow.runtime_layout.guide.paths

array of object

Path list.

data.workflow.runtime_layout.guide.paths[].id

string

ID of the current object.

data.workflow.runtime_layout.guide.paths[].label

string

Show labels.

data.workflow.runtime_layout.guide.paths[].description

string

Description of the current object.

data.workflow.runtime_layout.guide.paths[].field_ids

array of string or null

Field ID within the group.

data.workflow.runtime_layout.guide.groups

array of object

Field grouping.

data.workflow.runtime_layout.guide.groups[].id

string

ID of the current object.

data.workflow.runtime_layout.guide.groups[].label

string

Show labels.

data.workflow.runtime_layout.guide.groups[].path_ids

array of string or null

List of path IDs.

data.workflow.runtime_layout.guide.groups[].field_ids

array of string or null

Field ID within the group.

data.workflow.runtime_layout.guide.fields

array of object or null

Field definition.

data.workflow.runtime_layout.guide.fields[].field_id

string

Form field ID used to run input and layout associations.

data.workflow.runtime_layout.guide.fields[].role

string

Associated roles.

data.workflow.runtime_layout.guide.fields[].note

string

Additional explanation.

data.workflow.runtime_layout.guide.fields[].group_id

string

Layout group ID.

data.workflow.runtime_layout.guide.fixed

array of object

Is it fixed?

data.workflow.runtime_layout.guide.fixed[].label

string

Show labels.

data.workflow.runtime_layout.guide.fixed[].value

string

Value.

data.workflow.default_values

object

The default running value object allows extended keys.

data.workflow.design_graph

object

Schematic objects allow extended keys.

data.workflow.notification_config

object

Final state notification configuration objects allow extended keys.

data.workflow.moi_workflow_def_id

string

Workflow definition ID.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效"
}

Field

Type

Description

code

string

error code.

msg

string

Error description.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

ErrParamInvalid, ErrWorkspaceRequired

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

ErrForbidden

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

ErrNotFound

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

ErrConflict

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

500

ErrServer

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

ErrServiceUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on