Enable workflow¶
Switches a disabled (disabled) workflow to the ready (ready) state and reactivates its configured scheduled task or volume trigger entrypoint. Paused (paused) workflows must go through Resume workflow so workflow-paused executions are resumed together; calling this endpoint does not immediately start a new job run.
POST https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/{workflow_id}/enable
Before you begin¶
Prepare a personal access token with workflow enable permission and the target workspace ID.
Call Get workflow details to confirm the target workflow ID and verify that
statusisdisabledandsource_typeis notagent_automation_task.
Request parameters¶
Replace $AI_STUDIO_API_KEY, $WORKSPACE_ID, and $WORKFLOW_ID with actual values.
curl -X POST "https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/$WORKFLOW_ID/enable" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
ID of the workflow to enable, obtained from List workflows. |
Successful response¶
Returns HTTP 200 and the enabled workflow details. If the target workflow is already in the ready state, the current workflow details are returned directly.
{
"code": "OK",
"msg": "OK",
"data": {
"workflow": {
"id": "wf-001",
"name": "daily-import",
"description": "Import daily files",
"source_type": "manual_dsl",
"status": "ready",
"available_actions": [
"update",
"delete",
"run",
"pause",
"list_executions"
],
"execution_mode": "cron",
"cron_expression": "0 2 * * *",
"latest_workflow_version_id": "ver-001",
"execution_summary": {
"total_executions": 8,
"active_executions": 0
},
"trigger_summary": {
"mode": "cron",
"configured": true,
"enabled": true,
"cron_expression": "0 2 * * *"
},
"created_at": "2026-10-14T00:00:00Z",
"updated_at": "2026-10-14T08:30:00Z",
"dsl_yaml": "workflow:\n name: daily-import\n root: main\nroot:\n chain: []\n",
"definition_format": "dsl",
"moi_workflow_def_id": "def-001"
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
Result message; |
|
object |
Payload returned by this operation. |
|
object |
Enabled workflow detail object. |
|
string |
Associated agent automation task ID, returned only when linked. |
|
string |
Associated authoring session ID, returned when provided by the server. |
|
string |
Workflow ID. |
|
string |
Workflow name. |
|
string |
Workflow description, returned when set. |
|
string |
Workflow source type: |
|
string |
Workflow status after enabling; |
|
array of string |
Action hints derived from the current status ( |
|
string |
Configured execution mode: |
|
string |
Cron expression for scheduled execution, returned only when scheduled. |
|
string |
Associated draft ID, returned when provided by the server. |
|
string |
Associated candidate ID, returned when provided by the server. |
|
string |
Latest workflow version ID, returned when a version exists. |
|
string |
Workflow-level compute resource ID, returned when bound. |
|
array of object |
Workflow-level or node-level compute resource bindings, returned when bound. |
|
string |
Compute resource ID. |
|
string |
Compute resource name, returned when provided by the server. |
|
boolean |
Whether this binding applies at the workflow level. |
|
array of string |
Node names that use this compute resource binding. |
|
object |
Execution summary statistics. |
|
integer |
Total historical job executions. |
|
integer |
Number of currently active job executions. |
|
string |
Active job execution ID, returned when an active execution exists. |
|
string |
Active job execution status, returned when an active execution exists. |
|
string |
Most recent job execution ID, returned when execution history exists. |
|
string |
Most recent job execution status, returned when execution history exists. |
|
string |
Timestamp of the most recent job execution, returned when execution history exists. |
|
object |
Trigger configuration summary. |
|
string |
Trigger execution mode: |
|
boolean |
Whether trigger configuration is complete. |
|
boolean |
Whether the trigger is currently enabled. |
|
integer |
Bound volume ID, returned only for volume triggers. |
|
string |
Scheduled Cron expression, returned only for Cron triggers. |
|
string |
Dynamic API service name, returned only in dynamic service mode. |
|
string |
Input schema JSON string of the latest dynamic service version, returned when present. |
|
string |
Output schema JSON string of the latest dynamic service version, returned when present. |
|
string |
Creation time in RFC 3339 format. |
|
string |
Last update time in RFC 3339 format. |
|
string |
Workflow goal description, returned when provided by the server. |
|
string |
Planner model name, returned when provided by the server. |
|
string |
Workflow DSL YAML text. |
|
object |
Native MOWL workflow definition object, returned when saved in native format. |
|
string |
Definition format: |
|
object |
Runtime context object, returned when provided by the server. |
|
object |
Runtime input form definition, returned when configured; nested fields match Get workflow details. |
|
object |
Runtime input form layout, returned when configured; nested fields match Get workflow details. |
|
object |
Default runtime parameter object, returned when configured. |
|
object |
Workflow design graph object, returned when configured. |
|
object |
Terminal job notification configuration object, returned when configured. |
|
string |
Associated workflow definition ID, returned when present. |
|
object |
Interactive UI asset bound to a dynamic service, returned only when bound. |
|
string |
Derived service UI resource URI. |
|
string |
Workspace HTML file ID. |
|
string |
Resource MIME type, fixed to |
Error response¶
Returns 404 (ErrNotFound) when the workflow does not exist, and 409 when the workflow is managed by an agent automation task (source_type is agent_automation_task) or has a stale execution identity/version. Calling this endpoint on a paused workflow fails because its status precondition is not met; call Resume workflow instead.
{
"code": "ErrWorkflowUpdateManagedByAutomation",
"msg": "workflow is managed by an automation task; edit the automation task instead"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code, such as |
|
string |
Human-readable error message. |