Skip to content

OPEN-52

An asynchronous launch answers 202, once the run is stored, with execution_id and status queued.

What was open

ORC-12 said an asynchronous launch reports queued and runs no node in the request, but no rule fixed the HTTP status or the body of a launch over the API. A client could not find the run it had just started without knowing one implementation's answer. OCX-7 already fixed the answer of an external invocation, with an execution_id that is the persisted run's identifier.

Decision

New rule API-10. An asynchronous launch over the API answers 202 with {success: true, data: {execution_id, status}}, using OCX-7's names, so the API launch and the external invocation answer alike. execution_id is the persisted run's identifier, the value PIPE-1 publishes as id and a poll reports as pipeline_id. status is always queued (ORC-12, OCX-7), not whatever status is persisted by the time the answer is sent, which a fast worker may already have moved to running or further. The answer goes out only after the run is persisted, so an immediate poll never gets 404. A Location header should point at the run's pipeline route (API-9). The synchronous answer is left as it is. execution_id is a string, as PIPE-7 publishes pipeline_id, so the identifier compares equal wherever it appears. How a launch requests a synchronous wait, and what a synchronous launch answers, are implementation-defined until a rule defines them; MAN-19 and API-10 say so, and the gap is recorded in DEFERRED.md.

Rules affected