> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/workflow/get-workflow-by-id.md).

# Get workflow by ID

Retrieve the full workflow document by its entity ID. Optionally pass a `version` query parameter to fetch a specific published version instead of the draft.

## Get workflow by id

> Retrieve the full workflow document by entity ID — the complete graph including \`nodes\`, \`edges\`, \`startNode\`, \`trigger\`, \`settings\`, plus all server fields.\
> \
> \*\*Response \`data\` fields:\*\*\
> \- \`id\`, \`name\`, \`description\`, \`startNode\`, \`nodes\`, \`edges\`, \`trigger\` — the full graph\
> \- \`version\`, \`status\`, \`isEnabled\`, \`comment\`, \`settings\` — runtime config\
> \- \`checksum\` — \*\*copy this\*\* for every subsequent update, test, or publish call\
> \- \`staticUrl\`, \`versionInfo\`, \`dependencyMap\`, \`createdAt\`, \`updatedAt\`, \`publishedAt\`, \`testedAt\`, \`isLive\` — server metadata\
> \
> \*\*GET \`data\` ≈ POST body + server fields.\*\* You can take \`data\`, strip \`id\`/\`checksum\`/timestamps/\`version\`/\`status\`/\`staticUrl\`/\`versionInfo\`, and use it directly as a create or update body.\
> \
> \*\*\`version\` query param:\*\* pass a published version label (e.g. \`v1\`) to retrieve that version's graph instead of the draft.\
> \
> \*\*Canonical response file:\*\* \`Get/GET\_BY\_ID.json\`

```json
{"openapi":"3.0.3","info":{"title":"Nected Workflow API (Dev V1)","version":"1.0"},"tags":[{"name":"Workflow","description":"List, create, read, update, test, and publish workflows."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"security":[{"DevAuth":[]}],"components":{"securitySchemes":{"DevAuth":{"type":"apiKey","in":"header","name":"Nected-API-Key","description":"Your Nected API key. Obtain from your workspace settings."}},"schemas":{"GetWorkflowResponse":{"type":"object","description":"Success response for GET /dev/v1/workflow/{entity-id} — full workflow document","properties":{"data":{"$ref":"#/components/schemas/WorkflowDocument"},"code":{"type":"string"},"message":{"type":"string"}}},"WorkflowDocument":{"type":"object","description":"The complete workflow object returned by Get workflow by id.\nThis is the same shape as the Create/Update request body, plus server-generated fields.","properties":{"id":{"type":"string","description":"Server-generated entity ID"},"name":{"type":"string"},"description":{"type":"string"},"startNode":{"type":"string","description":"ID of the first non-trigger node to execute"},"nodes":{"type":"array","description":"Ordered list of all nodes in the workflow graph","items":{"$ref":"#/components/schemas/WorkflowNode"}},"edges":{"type":"array","description":"Connections between nodes (directed graph edges)","items":{"$ref":"#/components/schemas/WorkflowEdge"}},"trigger":{"type":"object","description":"Trigger configuration — typically {\"apiNode\": \"1\"}","properties":{"apiNode":{"type":"string"}}},"version":{"type":"string","description":"e.g. `draft`"},"status":{"type":"string","description":"e.g. `draft`, `published`"},"comment":{"type":"string"},"isEnabled":{"type":"boolean"},"settings":{"$ref":"#/components/schemas/WorkflowSettings"},"staticUrl":{"type":"string","format":"uri"},"versionInfo":{"nullable":true},"dependencyMap":{"type":"array","items":{}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string"},"publishedAt":{"type":"string","nullable":true},"testedAt":{"type":"string","nullable":true},"checksum":{"type":"string","description":"Current checksum — use for update/test/publish"},"isLive":{"type":"boolean"}}},"WorkflowNode":{"type":"object","description":"A node in the workflow graph. The `type` field determines what `data.nodeType` can be:\n- `trigger` — the API entry point (`nodeType: apiTrigger`). Always `id: \"1\"`.\n- `codeNode` — runs an inline code snippet (`nodeType: codeNode`).\n- `addNode` — UI placeholder node for connecting segments (`nodeType: addNodeMd`).\n- Other types: `ruleNode`, `connectorNode`, `responseNode`, `setVariableNode`, etc.","additionalProperties":true,"properties":{"id":{"type":"string","description":"Unique node ID within this workflow"},"type":{"type":"string","description":"Node type (trigger, codeNode, addNode, ruleNode, etc.)"},"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"style":{"nullable":true},"sourcePosition":{"type":"string","enum":["bottom","right"]},"targetPosition":{"type":"string","enum":["top","left"]},"draggable":{"type":"boolean"},"data":{"$ref":"#/components/schemas/WorkflowNodeData"}}},"WorkflowNodeData":{"type":"object","description":"Node-specific data. Shape varies by `nodeType`.","additionalProperties":true,"properties":{"nodeType":{"type":"string","description":"e.g. apiTrigger, codeNode, addNodeMd, ruleNode, connectorNode"},"name":{"type":"string","description":"Display name of the node"},"entity":{"type":"string"},"entityId":{"type":"string"},"pluginName":{"type":"string"},"status":{"type":"string","description":"Last execution status (success, error, etc.)"},"rootId":{"type":"string"},"sourceIds":{"nullable":true},"isMergeNode":{"type":"boolean"},"switcher":{"nullable":true},"conditions":{"nullable":true},"blockName":{"type":"string"},"input":{"type":"object","nullable":true,"description":"Input parameter definitions keyed by field name","additionalProperties":{"$ref":"#/components/schemas/NodeInputField"}},"output":{"nullable":true},"settings":{"type":"object","nullable":true,"description":"Node-level settings (varies by nodeType)"},"executedValue":{"description":"Last execution output (populated after test run)","nullable":true},"runInLoop":{"$ref":"#/components/schemas/RunInLoop"}}},"NodeInputField":{"type":"object","description":"Definition of a single input field on a node","additionalProperties":true,"properties":{"name":{"type":"string"},"dataType":{"type":"string","description":"e.g. string, numeric, boolean, json, list"},"executedValue":{"description":"Value used during the last test execution"},"isCaseSensitive":{"type":"boolean"},"isNullable":{"type":"boolean"},"isOptional":{"type":"boolean"},"keyAttribute":{"type":"string"},"keySource":{"type":"string"},"mapping":{"type":"boolean"},"notSend":{"type":"boolean"},"order":{"type":"integer"},"schemaId":{"type":"string"},"sendNull":{"type":"boolean"},"source":{"type":"string"},"attribute":{"type":"string"},"value":{"description":"Static value or expression; null when sourced dynamically"}}},"RunInLoop":{"type":"object","description":"Loop configuration for iterating over a list","properties":{"status":{"type":"boolean","description":"Whether this node runs in a loop"},"source":{"type":"string"},"attribute":{"type":"string"},"value":{"nullable":true}}},"WorkflowEdge":{"type":"object","description":"A directed connection between two nodes","properties":{"id":{"type":"string"},"source":{"type":"string","description":"ID of the source node"},"target":{"type":"string","description":"ID of the target node"},"type":{"type":"string"},"animated":{"type":"boolean"},"label":{"type":"string"},"markerEnd":{"type":"string"},"sourceHandle":{"type":"string"},"style":{"type":"object","properties":{"stroke":{"type":"string"},"strokeWidth":{"type":"number"}}},"data":{"type":"object","properties":{"edgeType":{"type":"string","description":"e.g. `then`, `else`"},"pathId":{"type":"string"}}}}},"WorkflowSettings":{"type":"object","description":"Runtime settings for the workflow","properties":{"auditIO":{"type":"boolean","description":"Whether to record input/output for audit logs"},"dateFormat":{"type":"string","description":"Date format locale (e.g. `in` for India)"},"timezone":{"type":"string","description":"IANA timezone string (e.g. `Asia/Kolkata`)"}}},"ErrorResponse":{"type":"object","description":"Error response wrapper","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Human-readable error message"},"data":{"nullable":true}}}}},"paths":{"/dev/v1/workflow/{entity-id}":{"get":{"operationId":"getWorkflowById","tags":["Workflow"],"summary":"Get workflow by id","description":"Retrieve the full workflow document by entity ID — the complete graph including `nodes`, `edges`, `startNode`, `trigger`, `settings`, plus all server fields.\n\n**Response `data` fields:**\n- `id`, `name`, `description`, `startNode`, `nodes`, `edges`, `trigger` — the full graph\n- `version`, `status`, `isEnabled`, `comment`, `settings` — runtime config\n- `checksum` — **copy this** for every subsequent update, test, or publish call\n- `staticUrl`, `versionInfo`, `dependencyMap`, `createdAt`, `updatedAt`, `publishedAt`, `testedAt`, `isLive` — server metadata\n\n**GET `data` ≈ POST body + server fields.** You can take `data`, strip `id`/`checksum`/timestamps/`version`/`status`/`staticUrl`/`versionInfo`, and use it directly as a create or update body.\n\n**`version` query param:** pass a published version label (e.g. `v1`) to retrieve that version's graph instead of the draft.\n\n**Canonical response file:** `Get/GET_BY_ID.json`","parameters":[{"name":"Nected-Branch","in":"header","required":false,"description":"Branch name (optional)","schema":{"type":"string"}},{"name":"entity-id","in":"path","required":true,"description":"The workflow entity ID (from create response `data.id`)","schema":{"type":"string"}},{"name":"version","in":"query","required":false,"description":"Specific published version to fetch (e.g. `v1`). Omit for the draft.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK — full workflow document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWorkflowResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no workflow for the given entity-id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

### Response shape

The API returns the standard wrapper: `code`, `message`, and `data`.

* **`data`** is the **full workflow object**: all `nodes`, `edges`, `startNode`, `trigger`, `settings`, plus server fields `id`, `checksum`, `version`, `status`, `staticUrl`, `versionInfo`, and timestamps.
* So: **GET `data` ≈ POST body + `id` + `checksum` + server metadata** — you can submit `data` (minus server-only fields) directly as a create or update body.

### Full `200` example

{% file src="/files/BVCpHp3LpMNuRhm2dgnM" %}

Replace example `id` / `checksum` values in `GET_BY_ID.json` with values from your environment.

Use the API reference below to try the endpoint.
