API documents¶
The OpenAPI documents of SPOT's HTTP APIs, generated from the code: one for each core service that serves HTTP, and one for each plugin kind. Plugins call two services, and serve the routes of their kind:
- the API gateway: every route a user, the dashboard, the CLI or a plugin calls;
- the knowledge service, which plugins call directly at
SPOT_KNOWLEDGE_URL. The routes tagged "Core only" are called by SPOT's own services only; - the plugin routes: the routes a plugin of each kind serves and core calls, as the SDK's
create_plugin_appdeclares them, for an analyzer, a context provider, a mail retriever and a responder.
Only core calls the internal services.
make docs:openapi writes them to docs/api. The CI job openapi fails when the documents committed differ from those the code generates.
API gateway¶
Knowledge service¶
Plugin routes¶
Analyzer¶
Context provider¶
Mail retriever¶
Responder¶
Internal services¶
Only core calls these services: no user, dashboard, CLI or plugin reaches them.
- the analyzer-orchestrator: workflows, analysis jobs and readiness;
- the mail-orchestrator: the messages the api-gateway hands over, and their jobs;
- the plugin-manager: the plugin containers the api-gateway asks for.
Each of these documents, and the gateway's, also has GET /metrics: the service's Prometheus metrics, for a scraper holding the metrics token (SPOT_METRICS_TOKEN), never published.