API for Model Image
Last Updated: June 25, 2026
Internal-Facing API for Model Image
When running in a server env (i.e. environment is any value other than local or development), the model image runs a FastAPI/Uvicorn server on connector.HOST:connector.PORT (default 0.0.0.0:5001). The API is internal-facing only — used for notification handling and health checks. There are no public-facing APIs; the image is not directly accessible from the outside world.
Endpoints
| Method | Route | Purpose |
|---|---|---|
POST | <connector.HOOK_ROUTE> (default /api/webhook) | Receives a Kafka webhook notification and triggers data processing. |
GET | <connector.HOOK_ROUTE> (default /api/webhook) | Liveness ping; returns ok. |
GET | /healthz | Health check; returns {"status": "ok"}. |
Behaviour
- Purpose: The
POSTendpoint handles internal notifications from the Kafka Webhook Service. - Notification handling: Upon receiving a notification, the image reads the
topicfrom the payload and subscribes to that topic via the Data Broker to fetch the actual data, then invokes the registered callback (or the control callback, if the topic matchesdbroker.CONTROL_TOPIC). The data fetch and callback run on a separate thread so the endpoint returns immediately. - Authentication: In
localanddevelopmentenvironments, requests are accepted without verification. In all other (server) environments, the request must include a valid X-Signature header, which is verified againstdbroker.SECRET(HMAC). Requests with an invalid signature are acknowledged but not processed.
Access Control
This API is only accessible within the internal network or through controlled service-to-service communication. It is not exposed to external clients or the public internet.
