Skip to main content

API overview

InterfaceSource of truthNotes
RESTapis/openapi.yaml (OpenAPI 3.0.3)Pages under REST are generated from the spec; do not edit them by hand. Default server http://localhost:8080.
Eventsapis/asyncapi.yaml (AsyncAPI 2.6.0)Summarised on the event catalogue.
MCP.claude/rules/mcp.md14 tools over Streamable HTTP on :8090; same use cases as REST.

Conventions​

  • Errors are RFC 7807 application/problem+json, with a stable slug such as process-path-not-found, missing-step-capacity or capacity-plan-already-published.
  • Auth: none. The fleet reverted REST and MCP auth on 2026-09-11, and a fitness test fails CI if auth middleware is reintroduced.
  • JSON field names are snake_case; timestamps are RFC 3339; quantities of assigned demand and shortage are orders; path_capacity is ORDER per hour.

Endpoint groups (tags)​

TagEndpoints
process-capacitiesPOST /process-capacities, GET /process-capacities
process-pathsGET /process-paths, POST /process-paths, GET /process-paths/{id}/capacity
capacity-plansGET /capacity-plans, POST /capacity-plans, GET /capacity-plans/comparisons, GET /capacity-plans/{id}, POST /capacity-plans/{id}/publications
station-capacityPUT /station-standards/{location}/{process_type}, GET /station-standards, GET /storage-capacity
demandGET /demand
reportsGET /reports/bottleneck-frequency, GET /reports/shortage-trend, GET /reports/plan-throughput, GET /reports/freshness (served by cmd/planning-reports on :8092, not by cmd/api)

cmd/api also serves GET /healthz (liveness) and GET /readyz (readiness, 503 once shutdown has started); neither is in the spec.

Regenerating the REST reference​

The reference is generated by docusaurus-plugin-openapi-docs into docs/docs/api-reference/rest and committed. After changing apis/openapi.yaml, run inside docs/:

npm run clean-api-docs warehouse-planning
npm run gen-api-docs warehouse-planning

The docs-api-drift CI job repeats this and fails if the committed output differs. Always run the clean step first: the generator skips files it believes are unchanged.