Skip to main content

API reference

The operation pages under this section are generated from apis/openapi.yaml by docusaurus-plugin-openapi-docs (npm run clean-api-docs && npm run gen-api-docs in docs/). This page maps every route to the binary that actually serves it, read from the routers in code.

network-inventory-planning (port 8080, Kong /api/network-inventory-planning)​

Source: internal/adapters/inbound/http/handler.go (Handler.Routes).

MethodPathPurposeNeeds
GET/healthzliveness; 204 No Contentnothing
POST/v1/transfer-proposal-runsadvisory proposals from an explicit snapshot in the body (asOf, positions, policies, lanes)nothing
GET/v1/transfer-simulationsadvisory per-site simulation from the local read modelsDATABASE_URL
POST/v1/transfer-approvalsoperator approval: starts the transfer saga; Idempotency-Key header requiredDATABASE_URL, KAFKA_BROKERS, TRANSFER_PICK_PATH_ID
GET/v1/transferslist transfers, newest first; state, originSiteId, destinationSiteId, limit (1–200, default 50), offsetDATABASE_URL
GET/v1/transfers/{id}one transfer with its audit trailDATABASE_URL
GET/v1/rebalance-runsscheduled-rebalance history, newest first; limit 1–200, default 50DATABASE_URL
GET/v1/rebalance-policiesthe Rebalance Policy catalogue ({policies:[{policy, revision, updatedAt}]})DATABASE_URL
PUT/v1/rebalance-policiesidempotent upsert of one Policy (keyed by Site + SKU); optional If-Match revision; ETag on the response; 201/200/400/409/412/422/503 (ADR 0015)DATABASE_URL
GET/v1/transfer-lanesthe Transfer Lane catalogue ({lanes:[{lane, revision, updatedAt}]})DATABASE_URL
PUT/v1/transfer-lanesidempotent upsert of one directed Lane (keyed by Origin → Destination); same rulesDATABASE_URL

The two colon routes (/v1/transfer-proposal-runs, /v1/transfer-approvals) are Google-style custom methods; they are in the OpenAPI spec as written.

The approval response is {transferId, state, originSiteId, destinationSiteId, sku, quantity, policyVersion, reservationId?, rejectionReason?, replayed, expiresAt, transferLineId}; a replay of the same key and body answers 200 with replayed: true.

nip-reports (port 8092, cluster-internal)​

Source: internal/adapters/inbound/http/reports_handler.go (ReportsServer.Routes). GET /healthz, /reports/transfer-funnel, /reports/state-dwell, /reports/stuck-transfers, /reports/rebalance-runs, /reports/freshness. They are in the same OpenAPI document (tag reports), but they are not served by the API process and are not routed by Kong. Query parameters and response shapes are listed in the Runbook.

mcp (port 8090)​

/ and /mcp are mounts of the MCP Streamable HTTP handler, not REST routes; GET /healthz answers {"status":"ok"}. See MCP tools.

nip-projector (port 8091, admin only)​

/healthz ({"status":"ok"}) and /readyz ({"status":"ready"}, or 503 {"status":"not_ready"} while shutting down). Not in the OpenAPI document.

Error model​

Every error is RFC 7807 application/problem+json with type = https://warehouse.example/problems/<slug>, title, status and detail. The full slug list is on Troubleshooting.

There is no authentication on any route.