Skip to main content
GET
Get a workflow definition by id
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/get?id=<workflowId> Returns one workflow with its active version (currentVersionDoc), its active deployment (deploymentInfo), and its most recent runs (recentRuns). The detail carries no list counts (activeRuns, pendingApprovals); those are on the list.

Visibility

The caller’s credential must hold workflows:read at the workflow’s home org unit. A workflow that does not exist, is trashed, has no home, or that the caller cannot read answers the same 404 resource_missing, so the response never reveals whether a hidden workflow exists. A missing or malformed id is also a 404. recentRuns holds up to five of the workflow’s most recent runs, keeping only those the caller may read: the credential’s scopes must include runs:read, and its grants must hold runs:read at the run’s home and at every company on the run. A run’s home is the org unit it recorded, or its workflow’s home when it recorded none (as an API- or Console-launched run does). It can be empty for a workflow the caller can read.

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.

Response

Workflow detail

data
object
required

GET /api/v2/workflows/get: the workflow's allowlisted fields, its active version and deployment, and its most recent runs the caller may read. It carries no list aggregates.

meta
object
required