Status
Public API: not yet exposed. Internal HTTP surface: live at /manufacturing-reports/*. gRPC layer: manufacturingReports.grpc.controller.js.
These are aggregation endpoints — the internal surface caches results for 5 minutes (per org+entity) and busts the cache on Work Order writes. The public API will keep the same caching semantics.
Planned endpoints
| Method | Planned path | Action | Planned scope |
|---|---|---|---|
GET | /orgs/:o/entities/:e/manufacturing-reports/job-costing | Job costing summary across recent Work Orders | manufacturingReport:read |
GET | /orgs/:o/entities/:e/manufacturing-reports/by-products | By-products produced from completed runs | manufacturingReport:read |
GET | /orgs/:o/entities/:e/manufacturing-reports/cost-analysis | Production cost analysis | manufacturingReport:read |
GET | /orgs/:o/entities/:e/manufacturing-reports/efficiency | Production efficiency metrics | manufacturingReport:read |
Caching behavior
Each report endpoint sits behind a Redis cache keyed manufacturingReport:<orgId>:<entityId>:<reportName> with a 5-minute TTL. Work Order writes (release/complete/cancel) invalidate the entire manufacturingReport:<orgId>:<entityId>: prefix.
Practical implication for clients: don't poll these endpoints at sub-minute intervals — you'll get the same cached payload back. Subscribe to work_order.completed (when manufacturing webhooks ship) and re-fetch on event.