Skip to main content
POST
Get Definition
Use this API to fetch a workflow definition. Returns the full DefinitionView. Filters out tombstoned definitions. A read response round-trips into Create Definition once you change definitionId and strip the server-owned version, createdAt, updatedAt, status, and compiled fields. Strip the explicit nulls too. Every optional field you never set comes back as null: description, groups, triggers, tags, custom, and organizationId / documentId inside scope. Create takes those fields as absent or as real values, never as null, so a leftover null fails the request with INVALID_ARGUMENT. See Duplicating a workflow.

Endpoint

POST https://api.velt.dev/v2/workflow/definitions/get

Headers

string
required
Your API key.
string
required

Body

Params

object
required

Example Requests

Get a definition

Response

Success Response

The compiled block

compiled is a read-only block on every DefinitionView. The authored edges echo sourceEdges byte-for-byte; compiled is the server-derived runtime view used to drive execution. Both are additive: render a workflow graph directly from compiled.forwardEdges instead of re-implementing group expansion client-side.
object

Failure Response

Errors: NOT_FOUND (definition does not exist or is tombstoned) / INVALID_ARGUMENT.