Skip to main content
GET
Get a workflow draft's nodes and edges
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

GET /api/v2/workflows/getDraftGraph Returns the nodes and edges of the workflow’s editable draft: the same graph the Forge Console builder edits, read live. An edit made in the builder or through the graph write routes shows up on the next read.

Authentication

External App credential or platform API key. Requires permission workflows:read, held at the workflow’s home org unit. The org unit a request acts from is not the workflow’s home.

Query parameters

string
required
The workflow ID. Give it exactly once.

Responses

string
The workflow ID.
string
The draft’s ID.
WorkflowDraftGraphNode[]
The draft’s nodes in creation order. Each has nodeId (the edit handle), logicalNodeId (the stable identity across publish and reset; absent on legacy rows), type, name, description, position, config (only the machine-writable fields that are set) and consoleOnlyConfig (the sorted names of the Console-only fields that are set, never their values), plus createdAt and updatedAt.
WorkflowDraftGraphEdge[]
The draft’s edges in creation order: edgeId, fromNodeId, toNodeId, and when set sourceHandle, targetHandle, condition, label, onError, description and collectGroup, plus createdAt and updatedAt.
boolean
true when the draft holds more than 200 nodes or 400 edges, and only the first 200 and 400 are returned. Such a draft cannot be edited through the API where an edit needs the whole graph; edit it in the Console.
Credential, vault, agent, person, recipient, channel, tool, procedure, model and sandbox settings are never returned; consoleOnlyConfig only says which of them a node carries.

Errors

Example

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Path Parameters

workflowId
string
required

Workflow document id. Give it exactly once.

Minimum string length: 1

Response

The draft graph; meta.partial is true when it was cut at a limit.

data
object
required

GET /api/v2/workflows/getDraftGraph: the draft's nodes and edges in creation order, at most 200 nodes and 400 edges (meta.partial is true when more exist). A node's config holds only machine-writable fields; consoleOnlyConfig names the Console-only fields set on it, never their values.

meta
object
required