Week 2 · Lesson 08
REST interface
Stable HTTP contracts so UI and scripts are interchangeable clients of the orchestrator.
Learn
- Errors as contracts (status + body shape)
- Idempotent reads; careful writes
- API is not the agent — it starts runs and exposes state
Build
- CRUD posts, list/filter, get run timeline
PATCH /api/posts/:id, approve / request-changes- Consistent JSON error shape
Checkpoint
curl alone can create a post, start a run, approve — no UI required.
Four notes
- What problem does this layer solve?
- What is allowed to call it?
- What must it never do?
- How do I observe and test it?