List workflow versions¶
Lists all version records under the specified workflow definition across draft, published, and deprecated statuses. Items are returned in ascending Version order (ties broken by ID) without pagination.
GET https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/{workflow_id}/versions
Before you begin¶
Prepare a personal access token with workflow version read permission and the target workspace ID.
Call List workflows to obtain the target workflow ID.
Request parameters¶
Replace $AI_STUDIO_API_KEY, $WORKSPACE_ID, and $WORKFLOW_ID with actual values.
curl "https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/$WORKFLOW_ID/versions" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workflow ID, obtained from List workflows. |
Successful response¶
Returns HTTP 200 and the data.items version array; if the workflow definition has no version records yet, data.items is []. Version object keys use PascalCase on the JSON wire.
{
"code": "OK",
"msg": "OK",
"data": {
"items": [
{
"ID": "ver-001",
"WorkspaceID": "ws-001",
"UserID": "user-001",
"WorkflowDefinitionID": "def-001",
"Version": 1,
"WorkflowJSON": "{\"name\":\"daily-import\",\"nodes\":[]}",
"Status": "published",
"CreatedBy": "user-001",
"CreatedAt": "2026-10-14T08:00:00Z",
"PublishedAt": "2026-10-14T08:05:00Z",
"Type": 1,
"InputSchema": "",
"OutputSchema": "",
"ResultMode": 0,
"Description": "Initial published version",
"RuntimeSpecJSON": ""
},
{
"ID": "ver-002",
"WorkspaceID": "ws-001",
"UserID": "user-001",
"WorkflowDefinitionID": "def-001",
"Version": 2,
"WorkflowJSON": "{\"name\":\"daily-import\",\"nodes\":[]}",
"Status": "draft",
"CreatedBy": "user-001",
"CreatedAt": "2026-10-14T09:00:00Z",
"PublishedAt": "0001-01-01T00:00:00Z",
"Type": 1,
"InputSchema": "",
"OutputSchema": "",
"ResultMode": 0,
"Description": "Add input field validation",
"RuntimeSpecJSON": ""
}
]
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
Result message; |
|
object |
Payload returned by this query. |
|
array of object |
Workflow version list ordered by ascending |
|
string |
Workflow version ID, used in Get workflow version details, Publish a workflow version, Deprecate a workflow version, or Delete a workflow version. |
|
string |
Workspace ID that owns the version. |
|
string |
User ID of the workflow owner. |
|
string |
Workflow definition ID that owns the version. |
|
integer |
Positive integer version number starting from |
|
string |
Saved workflow definition JSON string. |
|
string |
Version status: |
|
string |
User ID of the actor who created the version. |
|
string |
Version creation time in RFC 3339 format. |
|
string |
Version publication time in RFC 3339 format; |
|
integer |
Version type code: |
|
string |
Saved input schema JSON string; |
|
string |
Saved output schema JSON string; |
|
integer |
Result mode code: |
|
string |
Version description; |
|
string |
Saved runtime specification JSON string; |
Error response¶
Returns 404 (ErrNotFound) when the workflow does not exist or has no bound workflow definition, or 403 (ErrForbidden) when the current identity lacks read permission.
{
"code": "ErrNotFound",
"msg": "Not Found"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code, such as |
|
string |
Human-readable error message. |