View workflow jobs¶
Lists the workflow execution jobs that are readable by the current caller. First find the execution ID through this interface, and then query the job details or results.
GET https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/{workflow_id}/executions
Preparation before calling¶
Prepare a personal access token with workflow read permission and the target workspace ID. First query workflow details to confirm that the workflow can be read and obtain its ID. If the detail request returns 404, verify the ID before requesting the list.
To list jobs across the workflows readable by the caller in the target workspace, use /v5/workflow/v2/workflow-apps/executions without a workflow_id path parameter.
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The workflow whose jobs you want to list. |
Query parameters¶
offsetinteger- Returns the starting position of the list.
limitinteger- Return the quantity.
statusstring- Filter by job status.
execution_modestring- Filter by execution mode.
workflow_namestring- Filter by workflow name when using the global job list.
Request example
curl "https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/$WORKFLOW_ID/executions?offset=0&limit=20" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Successful response¶
Returns 200 on success. data.total is the total number of matches, and data.executions is the job summary for the current page. An empty array means this request returned no matching jobs; it does not prove that the specified workflow exists or that a job has finished. A missing workflow can also return 200 with an empty list. Query workflow details before polling jobs. Stop reading further pages when the item count is less than limit or the offset reaches total.
codestring- `OK` when successful.
msgstring- `OK` when successful.
data.totalinteger- The total number of jobs that meet the filter conditions.
data.executionsarray of object- Current page job summary; empty array when there are no results.
data.executions[].execution_idstring- Execution ID.
data.executions[].workflow_idstring- ID of the workflow to which it belongs.
data.executions[].dispatch_job_idstring- Scheduling job ID; returned when provided by the server.
data.executions[].workflow_namestring- Workflow name; returned when provided by the server.
data.executions[].statusstring- Current status.
data.executions[].execution_modestring- Execution mode.
data.executions[].available_actionsarray of string- Operations allowed in the current state.
data.executions[].cron_expressionstring- Cron expression; only returned in timing mode.
data.executions[].moi_task_idstring- Task ID; returned when the server has assigned it.
data.executions[].moi_case_idstring- Case ID; returned when the server has assigned it.
data.executions[].moi_workflow_def_idstring- Workflow definition identifier; returned when the server has assigned it.
data.executions[].moi_workflow_version_idstring- Workflow version identifier; returned when the server has assigned it.
data.executions[].data_namestring- The name of the data associated with this execution; returned when applicable.
data.executions[].file_idstring- The file ID associated with this execution; returned when applicable.
data.executions[].pause_scopestring- Pause range; returned when in pause state and provided by the server.
data.executions[].errorstring- Current execution error; returned when there is an error.
data.executions[].started_atstring- Start time; may be omitted if not generated.
data.executions[].ended_atstring- End time; may be omitted if not generated.
data.executions[].created_atstring- Creation time; may be omitted if not generated.
data.executions[].updated_atstring- Last updated time; may be omitted if not generated.
Successful response example
{
"code": "OK",
"msg": "OK",
"data": {
"total": 1,
"executions": [
{
"execution_id": "exec-001",
"dispatch_job_id": "dispatch-001",
"workflow_id": "wf-001",
"workflow_name": "daily-import",
"status": "running",
"available_actions": ["pause", "cancel"],
"execution_mode": "one_shot",
"moi_task_id": "task-001",
"moi_case_id": "case-001",
"started_at": "2026-08-18T10:00:00Z",
"created_at": "2026-08-18T10:00:00Z",
"updated_at": "2026-08-18T10:01:00Z"
}
]
}
}
Error response¶
The following HTTP 400 response indicates invalid query parameters. Do not rely on the job list returning 404 to determine whether a workflow exists.
codestring- Error code.
msgstring- Readable error message.
Error response example
{
"code": "ErrParamInvalid",
"msg": "Bad Request"
}
Follow-up operations¶
Use data.executions[].workflow_id and execution_id query workflow job details.