# Get workflow details

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

Reads a workflow definition, runtime configuration, and current status.

```text
GET https://moi.matrixorigin.cn/newmoi/workflow/v2/workflow-apps/{workflow_id}
```

## Before you call

Use [List workflows](list-workflows.md#query-parameters) to find the workflow. Prepare a [personal access token](../../../../../guides/genesis/api-keys.md#create-and-manage-personal-access-tokens) with workflow read permission and the [target workspace ID](../../../../../guides/ai-studio/resource-center/workspace.md#copy-the-workspace-id).

## Path parameters

Replace `$AI_STUDIO_API_KEY`, `$WORKSPACE_ID`, and `$WORKFLOW_ID` with your own values.

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

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

:::::
:::::{tab-item} Parameter reference

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workflow_id` | string | Yes | Workflow ID to read. |

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

## Successful response

Returns 200 and the current saved workflow definition and configuration.

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

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "workflow": {
      "id": "wf-001",
      "name": "daily-import",
      "description": "Imports daily files",
      "source_type": "manual_dsl",
      "status": "ready",
      "available_actions": ["update", "delete", "run", "pause"],
      "execution_mode": "cron",
      "cron_expression": "0 2 * * *",
      "dsl_yaml": "workflow:\\n  name: daily-import\\n  root: main\\nroot:\\n  chain: []\\n",
      "default_values": {},
      "latest_workflow_version_id": "ver-001",
      "latest_version": 3,
      "execution_summary": {"total_executions": 8, "active_executions": 0},
      "trigger_summary": {"mode": "cron", "configured": true, "enabled": true},
      "created_at": "2026-08-18T10:00:00Z",
      "updated_at": "2026-08-18T11:00:00Z"
    }
  }
}
```

:::::
:::::{tab-item} Field reference

::::{tab-set}
:::{tab-item} Identity and state

The following fields are in `data.workflow`.

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data.workflow` | object | Workflow detail. |
| `id` | string | Workflow ID. |
| `name` | string | Workflow name. |
| `description` | string | Workflow description, when set. |
| `source_type` | string | Workflow source type. |
| `status` | string | Current status. |
| `available_actions` | string[] | Actions allowed in the current state. |
| `execution_mode` | string | Configured execution mode. |
| `cron_expression` | string | Cron expression for scheduled workflows. |
| `goal` | string | Workflow goal, when provided. |
| `planner_model` | string | Planner model, when provided. |
| `draft_id` | string | Draft ID, when provided. |
| `session_id` | string | Workflow session ID, when provided. |
| `candidate_id` | string | Candidate ID, when provided. |

:::
:::{tab-item} Definition and input

| Field | Type | Description |
| --- | --- | --- |
| `dsl_yaml` | string | Workflow DSL YAML. |
| `run_context` | object | Runtime context, when provided. |
| `runtime_fields` | object | Runtime input form, when configured. |
| `runtime_layout` | object | Runtime input layout, when configured. |
| `default_values` | object | Runtime input default values, when configured. |
| `design_graph` | object | Workflow design graph, when configured. |

:::
:::{tab-item} Version, runs, and triggers

| Field | Type | Description |
| --- | --- | --- |
| `moi_workflow_def_id` | string | Workflow definition ID, when provided. |
| `latest_workflow_version_id` | string | Latest workflow version ID, when provided. |
| `latest_version` | integer | Latest workflow version number, when provided. |
| `latest_version_status` | string | Latest workflow version status, when provided. |
| `execution_summary` | object | Execution summary. |
| `execution_summary.total_executions` | integer | Total executions. |
| `execution_summary.active_executions` | integer | Active executions. |
| `execution_summary.active_execution_id` | string | Active execution ID, when any. |
| `execution_summary.active_execution_status` | string | Active execution status, when any. |
| `execution_summary.latest_execution_id` | string | Latest execution ID, when any. |
| `execution_summary.latest_execution_status` | string | Latest execution status, when any. |
| `execution_summary.latest_execution_at` | string | Latest execution time, when any. |
| `trigger_summary` | object | Trigger summary. |
| `trigger_summary.mode` | string | Trigger mode. |
| `trigger_summary.configured` | boolean | Whether a trigger is configured. |
| `trigger_summary.enabled` | boolean | Whether the trigger is enabled. |
| `trigger_summary.volume_id` | integer | Volume ID for volume triggers. |
| `trigger_summary.cron_expression` | string | Cron expression for scheduled workflows. |
| `trigger_summary.service_name` | string | Service name for dynamic services. |

:::
:::{tab-item} Compute resources and time

| Field | Type | Description |
| --- | --- | --- |
| `compute_resource_id` | string | Workflow-level compute resource ID, when associated. |
| `compute_resource_bindings` | object[] | Workflow-level or node-level resource bindings. |
| `compute_resource_bindings[].id` | string | Compute resource ID. |
| `compute_resource_bindings[].name` | string | Compute resource name, when provided. |
| `compute_resource_bindings[].workflow_level` | boolean | Whether this is a workflow-level binding. |
| `compute_resource_bindings[].node_names` | string[] | Names of nodes using the binding. |
| `created_at` | string | Creation time, when provided. |
| `updated_at` | string | Last update time, when provided. |

:::
::::

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

## Error response

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

```json
{"code": "ErrNotFound", "msg": "Resource not found", "data": null}
```

:::::
:::::{tab-item} Field reference

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `msg` | string | Error message. |
| `data` | null | Empty on error. |

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

## Next steps

Keep `data.workflow.id`. Use [Update workflow](update-workflow.md#path-parameters) to change it or [Start a workflow job](../workflow-jobs/start-workflow-job.md#path-parameters) to run it.
