Skip to main content
GET
Validate a workflow draft
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/validateDraft Runs the same validator the Forge Console builder, the Workflow Architect and the publish check use over the workflow’s editable draft, and returns its verdict. Nothing is written. Validate after editing the graph with the draft graph routes.

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.
string
clean, hasWarnings (warnings, no errors) or hasErrors.
number
Errors found. warningCount and infoCount count the other severities.
WorkflowDraftValidationIssue[]
Every finding, in the validator’s order. Each has code (a stable UPPER_SNAKE rule code), severity (error, warning or info), layer (1 graph, 2 semantic, 3 platform reference), the nodeId and edgeId it concerns when it has one, message and messageWithheld. A required-input finding may carry suggestedPatch: the node’s complete repaired inputs map, to send as config to updateDraftNode for suggestedPatch.nodeId.
string
publishable (no errors), gated (the only errors are unpromoted provisional procedures) or broken.
WorkflowDraftValidationBlocker[]
The errors, grouped by code and message, each with the nodeIds it affects.
When a finding’s details would name a Console-only node setting or a platform resource (an agent, tool, credential, procedure, destination or recipient), its message is a fixed text and messageWithheld is true. The code, severity, layer and node are still returned; open the workflow in the Forge Console to see the details. publishable covers the validator only. Publishing also checks the publisher’s own entitlements; publish with publishDraft (workflows:manage at the platform scope) or in the Forge Console.

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's validation verdict.

data
object
required

GET /api/v2/workflows/validateDraft: the Forge Console's validation verdict for the draft. issues keep the validator's order; a message naming Console-only node settings or platform resources is withheld (messageWithheld). publishability is publishable (no errors), gated (only unpromoted provisional procedures block) or broken. Publishing (POST /api/v2/workflows/publishDraft) runs further checks that depend on the publisher.

meta
object
required