# Get workflow version details

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Reads details of a single workflow version by its version ID. The server verifies that the version belongs to the same workflow definition and owner as the target workflow.

```text
GET https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/{workflow_id}/versions/{version_id}
```

## Before you begin

1. Prepare a [personal access token](../../../../../../guides/genesis/api-keys.md#creating-and-managing-personal-access-tokens) with workflow version read permission and the [target workspace ID](../../../../../../guides/ai-studio/resource-center/workspace.md#copy-the-workspace-id).
2. Call [List workflow versions](list-workflow-versions.md) to obtain `ID`, or read `latest_workflow_version_id` from [Get workflow details](../get-workflow.md).

## Request parameters

Replace `$AI_STUDIO_API_KEY`, `$WORKSPACE_ID`, `$WORKFLOW_ID`, and `$VERSION_ID` with actual values.

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl "https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/$WORKFLOW_ID/versions/$VERSION_ID" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameters

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workflow_id` | string | Yes | Target workflow ID, obtained from [List workflows](../list-workflows.md). |
| `version_id` | string | Yes | Target workflow version ID, obtained from `ID` in [List workflow versions](list-workflow-versions.md). |

:::::
::::::
:::::::

## Successful response

Returns HTTP `200` and the requested workflow version object. Version object keys use PascalCase on the JSON wire.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "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": ""
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` when the request succeeds. |
| `msg` | string | Result message; `OK` when the request succeeds. |
| `data` | object | Requested workflow version object. |
| `data.ID` | string | Workflow version ID. |
| `data.WorkspaceID` | string | Workspace ID that owns the version. |
| `data.UserID` | string | User ID of the workflow owner. |
| `data.WorkflowDefinitionID` | string | Workflow definition ID that owns the version. |
| `data.Version` | integer | Positive integer version number starting from `1`. |
| `data.WorkflowJSON` | string | Saved workflow definition JSON string. |
| `data.Status` | string | Version status: `draft`, `published`, or `deprecated`. |
| `data.CreatedBy` | string | User ID of the actor who created the version. |
| `data.CreatedAt` | string | Version creation time in RFC 3339 format. |
| `data.PublishedAt` | string | Version publication time in RFC 3339 format; `0001-01-01T00:00:00Z` when unpublished. |
| `data.Type` | integer | Version type code: `1` for workflow, `2` for dynamic API service. |
| `data.InputSchema` | string | Saved input schema JSON string; `""` when unset. |
| `data.OutputSchema` | string | Saved output schema JSON string; `""` when unset. |
| `data.ResultMode` | integer | Result mode code: `0` for unspecified, `1` for single response, `2` for streaming. |
| `data.Description` | string | Version description; `""` when unset. |
| `data.RuntimeSpecJSON` | string | Saved runtime specification JSON string; `""` when unset. |

:::::
::::::
:::::::

## Error response

Returns `404` (`ErrNotFound`) when the workflow does not exist, the version does not exist, or the version does not belong to the target workflow definition.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "ErrNotFound",
  "msg": "Not Found"
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code, such as `ErrWorkspaceRequired`, `ErrForbidden`, `ErrNotFound`, or `ErrServer`. |
| `msg` | string | Human-readable error message. |

:::::
::::::
:::::::
