Skip to content

API and application services

FastAPI handles privileged portals, transactions, integrations and external effects. Route handlers establish the caller and target scope. Reusable services implement domain and provider behaviour below those handlers. Database transactions own atomic record changes; provider outcomes require their own confirmation and recovery mechanisms.

Authentication and capability dependencies run before handler business work. Resource checks then establish ownership and applicable relationships for the requested record. Platform-administrator capability exceptions do not remove the need to establish scope. Capabilities and resource access explains the shared distinction between operation permission and record authority. Direct browser queries use row-level security; that policy does not scope a service-role business query.

Privileged route policy gives the detailed contract, examples and evidence limits.

Routes translate HTTP requests into typed application operations and return their results. Validation, row limits and error behaviour constrain callers independently of UI forms. Revisions, pagination and idempotency vary by operation and must be read from the owning contract. The current MCP response contract is a separate client-facing interface.

HTTP inputs, outputs and errors gives the detailed contract, examples and evidence limits.

Services contain reusable business and integration logic below routes. Provider-specific identifiers and semantics remain behind adapters where the owning domain defines them. Shared services do not automatically imply identical permissions or transaction boundaries for every caller. Integration ownership determines the contract Toolora must preserve at each external boundary.

Application services and adapters gives the detailed contract, examples and evidence limits.

A rejected revision and an unknown external result require different responses. A conflict indicates that the reviewed record no longer matches the requested version. A provider timeout may leave the external outcome unknown. Integration recovery must reconcile that outcome before a retry can safely repeat an external action.

Diagnose conflicts and uncertain results gives the detailed contract, examples and evidence limits.