Skip to content

Every surface that returns a workflow returns one object

List, create, read and update all publish the same workflow object. A client learns one shape, not four.

The rule

Normative: this is the rule
  1. Every surface that returns a workflow MUST carry the keys id, name, description, nodes, edges, metadata, created, changed and uid.
  2. nodes MUST be enriched with each node's node-type metadata.
  3. metadata MUST be the value as published on read.
  4. These keys MUST be spelled in lower case, created, changed and uid included.
  5. interface MUST be present when the workflow declares at least one input or output port.
  6. interface MUST be absent when the workflow declares none, never emitted as an empty object or an empty array.
  7. A workflow MUST have the same values for these keys on every surface that returns it, including any surface that embeds a workflow outside the API.
  8. A read of one workflow, on the route API-9 names workflow, MUST answer 404 with the code NOT_FOUND for a workflow that does not exist only to a caller holding blanket authority over workflows.
  9. Every other identified caller MUST get 403 with the code ACCESS_DENIED (a request without accepted credentials gets 401, conventions), the same answer as for a workflow that exists but that the caller may not view, so that the read cannot be used to learn which workflows exist.

What it means

A client that has decoded a workflow from one surface can decode it from any other without a special case: same nine keys, spelled alike. That includes the list surface, where each row is a full workflow object rather than a thinner projection — a caller does not have to fetch a workflow a second time to learn a field the list already carried.

The nine keys are the ones every surface carries. An implementation can add keys of its own to a workflow, and a client ignores the ones it does not recognise.

interface is conditional on the workflow itself, not on which surface answered. A workflow with no declared input or output lacks interface everywhere, not just on the surfaces that happen to check; a workflow with at least one declared port carries interface everywhere, never as an empty placeholder. Absent and empty mean different things elsewhere in this specification, and this is the case where the difference is load-bearing: an author who removes every declared port sees the key disappear, not turn into {}.

Example

Unfiltered, interface does not appear at all.

A workflow with no declared ports200 — read
GET /api/flowdrop/workflows/{workflow_id}

{"id": "wf_no_ports", "name": "No ports", "description": "", "nodes": [ … ], "edges": [ … ], "metadata": { … }, "created": …, "changed": …, "uid": … }

Declare one input, and the same nine keys gain interface, on create as much as on read.

Creating a workflow that declares one input201 — stored
POST /api/flowdrop/workflows

{"id": "wf_shape_iface", "name": "Shape with interface", "nodes": [ … ], "interface": {"inputs": [{"id": "numbers", "bindings": [{"nodeId": "calc1", "portId": "values"}]}]}}
The same workflow, read back200 — read
GET /api/flowdrop/workflows/{workflow_id}

{"id": "wf_shape_iface", "name": "Shape with interface", "description": "", "nodes": [ … ], "edges": [ … ], "metadata": { … }, "created": …, "changed": …, "uid": …, "interface": {"inputs": [ … ]}}

The list surface answers the same shape, row by row: a caller scanning GET /api/flowdrop/workflows sees interface on exactly the rows that declare a port, never on the rows that do not.

A read of a workflow that does not exist is 404 only for a caller with authority over every workflow; anyone else gets the same 403 as for a workflow they may not view, so the read reveals nothing about which identifiers are in use.

Why

Recorded under OPEN-23, OPEN-25, OPEN-61, OPEN-65.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · STORE-14 · changed in spec 1.1