{"openapi":"3.0.3","info":{"title":"OrchestrateOS Control Plane API","version":"0.2.0","description":"Cloudflare Worker + D1 API for run lifecycle, resume gates, RBAC, audit events, and replay."},"servers":[{"url":"https://orchestrateos-api.nevaquit.workers.dev"}],"paths":{"/health":{"get":{"summary":"Health check","responses":{"200":{"description":"OK"}}}},"/start_run":{"post":{"summary":"Create a new workflow run","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workflow_name":{"type":"string"},"run_id":{"type":"string","format":"uuid"},"metadata":{"type":"object"},"environment":{"type":"string","enum":["dev","staging","prod"]}},"required":["workflow_name"]}}}}}},"/runs/{run_id}":{"get":{"summary":"Full run with step audit trail (Python SDK shape)"},"patch":{"summary":"Update run status and metadata"}},"/idempotency/{key}":{"get":{"summary":"Lookup completed step by idempotency key"}},"/runs/{run_id}/steps":{"post":{"summary":"Record a completed or failed step","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}}]}},"/runs/{run_id}/status":{"get":{"summary":"Run status and gate summary"}},"/runs/{run_id}/resume_blockers":{"get":{"summary":"List compensation/approval gates"}},"/runs/{run_id}/compensate":{"post":{"summary":"Record partial-failure compensation"}},"/runs/{run_id}/approve":{"post":{"summary":"Grant human approval for permanent failure"}},"/runs/{run_id}/ack_prod_resume":{"post":{"summary":"Acknowledge production resume (prod environment)"}},"/runs/{run_id}/replay":{"get":{"summary":"Deterministic replay payload from completed steps"}},"/runs/{run_id}/compliance_export":{"get":{"summary":"Compliance bundle — steps, gates, audit, replay, idempotency analysis"}},"/runs/{run_id}/audit_events":{"get":{"summary":"Immutable governance audit event log"}},"/resume":{"post":{"summary":"Validate resume readiness (409 if gated)"}},"/runs/{run_id}/audit_log":{"get":{"summary":"Deterministic audit trace"}},"/demo/runs":{"get":{"summary":"List seeded demo runs for the gate explorer"}},"/demo/reset":{"post":{"summary":"Reset demo runs to initial gate state"}}}}