A refused schema read is a bare error document that hides existence
The rule
- A schema read for a workflow that does not exist MUST answer
404with the codeNOT_FOUNDto a caller holding blanket authority over workflows, and403with the codeACCESS_DENIEDto every other identified caller (a request without accepted credentials gets401, conventions). - A schema read for a workflow that exists but that the caller may not view MUST answer
403with the codeACCESS_DENIED. - The two
403answers MUST be indistinguishable, so that the schema route cannot be used to learn which workflows exist. - Each refusal MUST be a bare error document like META-4's bare success document: an object carrying
erroranderror_code, with nosuccesskey. - Each MUST be answered before anything else about the workflow is read, so a refused identifier never reaches the schema version or the entity tag.
What it means
A refused identifier is answered before the schema version or the entity tag is
worked out at all — there is nothing the caller may see to version or tag, so
nothing downstream of the lookup is reached. Which refusal comes back depends on
who is asking, as it does for a run (PIPE-1): a caller with authority over every
workflow is told 404 for a workflow that does not exist, and everyone else gets
the same 403 for a workflow that does not exist as for one they may not view.
The schema route would otherwise tell anyone which workflow identifiers are in
use.
The body is bare, like the schema document itself (META-4): error and
error_code, not the {success, error} envelope other endpoints on this API
return. A caller that reads success to decide whether a response failed finds
nothing there to read, and reads the status and error_code instead.
Example
GET /api/flowdrop/workflows/{workflow_id}/schema
{"error": "Workflow not found.", "error_code": "NOT_FOUND"}GET /api/flowdrop/workflows/{workflow_id}/schema
{"error": "Access denied", "error_code": "ACCESS_DENIED"}The paths are examples of the route API-9 names workflow_schema.