Skip to content

The API maps a client interface onto the stored manifest

What an editor calls an interface entry and what the server stores as a manifest entry are the same thing under two vocabularies. This is the mapping, including what it deliberately ignores.

The rule

Normative: this is the rule
  1. A workflow's API MUST accept an interface object.
  2. It MUST map the object onto the stored input and output manifests.
  3. An entry's client-side identifier MUST become the server-side input name; renaming either is a breaking change for callers.
  4. An entry carries at most one binding, whose node and port identifiers MUST become the entry's node_id and port.
  5. An entry carrying more than one binding MUST be refused with 422 and the code INVALID_REQUEST_BODY.
  6. The request MUST store nothing.
  7. An entry carrying no binding MUST be stored as an unbound entry (MAN-2), and MUST NOT be an error.
  8. An entry's declared schema MUST be stored as the entry's schema, and its declared data type as that schema's x-data-type.
  9. A default value and free-form metadata on an entry MUST be ignored on write, because they have no server representation.
  10. Input-side author metadata (the entry's display name, description, examples and required flag) MUST round-trip as author-written manifest metadata does.
  11. An output entry carries its name, its declared type and schema, and its binding where it has one, and none of the input-side metadata.
  12. On read, an unbound entry MUST be published with an empty list of bindings.
  13. The mapped manifests MUST be applied before the workflow is validated.
  14. A bound entry naming a node or port that does not exist MUST be refused by workflow validation, with 422 and the code VALIDATION_FAILED (STORE-5).
  15. The API's own refusals, made before the workflow is validated, MUST cover the entry's shape only.

What it means

An interface entry names at most one binding. An entry naming two is refused outright, before anything else about it is even looked at — a shape failure, not a decision about whether the node or port it names exists. An entry naming none is not a failure either: it is an unbound entry, stored with the schema and data type it declares, and read back with an empty list of bindings. That is what lets an author publish the interface first and build the inside later.

That shape check happens before the workflow is validated, so it answers a different question than validation does. A binding whose node or port is made up entirely is not caught here — it is caught by the same check that would catch it on a directly-stored port array, and reported as a validation error with its locator (STORE-5). Both are 422: in each case the body was read and its content refused. The API's own refusals stop at the entry's shape; whether what it points to is real is validation's answer.

Example

An entry naming the same binding twice422 — INVALID_REQUEST_BODY
POST /api/flowdrop/workflows

{"name": "Over-bound", "nodes": [ … ], "interface": {"inputs": [
  {"id": "numbers", "bindings": [
    {"nodeId": "calc1", "portId": "values"},
    {"nodeId": "calc1", "portId": "values"}
  ]}
]}}
An unbound entry, alongside one that is bound201 — stored
POST /api/flowdrop/workflows

{"name": "Interface first", "nodes": [ … ], "interface": {"inputs": [
  {"id": "topic", "dataType": "string", "schema": {"type": "string"}, "bindings": []},
  {"id": "numbers", "bindings": [{"nodeId": "calc1", "portId": "values"}]}
]}}
An entry whose binding names a node that does not exist422 — VALIDATION_FAILED
PUT /api/flowdrop/workflows/{workflow_id}

{"name": "Ghost", "interface": {"inputs": [
  {"id": "numbers", "bindings": [{"nodeId": "ghost_node", "portId": "values"}]}
]}}

The unbound entry is stored: the response's interface.inputs names both topic, with "bindings": [], and numbers.

Why

Recorded under OPEN-22, OPEN-25, OPEN-27, OPEN-49.

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