API
Lynx API
REST surface, OpenAPI spec, and outbound webhooks for the Lynx platform.
lynx_api
· v19.0.1.0.1
· Premium
What this solves
Lynx API
The productized REST and webhook surface for every Lynx module — one consistent envelope, one auth scheme, one OpenAPI spec, one audit log.
Lynx ships dozens of business modules (ticketing, housing, compliance, appointments, cloud billing, …) and each one used to grow its own ad-hoc /api/v1/* controller with bespoke envelopes and error formats. This module is the foundation that replaces all of that: a generic CRUD dispatcher driven by a declarative lynx.api.resource registry, a @lynx_route decorator that adds bearer auth + scope enforcement + audit logging + premium gating in one wrapper, and a first-class outbound webhook framework with HMAC signing, retry queue, and delivery log. Bridges (lynx_api_<module>) plug their models in with ~50 lines of XML.
Key Features
Generic CRUD dispatcher — /lynx/api/v1/<slug>[/{id}] handles list, retrieve, create, update, delete for every registered resource via the lynx.api.resource model; bridges declare resources with XML records, no controller code needed for plain CRUD.
`@lynx_route` decorator — wraps http.route to add scope enforcement, automatic api.access premium gating, standard response and error envelopes, and per-request audit log entries.
OpenAPI 3.1 generator — /lynx/api/v1/openapi.json and a vendored Swagger UI at /lynx/api/v1/docs; the spec also documents Odoo's standard /jsonrpc and /web/dataset/call_kw so existing Odoo client libraries (odoorpc, xmlrpc) keep working unchanged.
Scoped API keys — extends res.users.apikeys with a scope_ids whitelist so a single key can be limited to e.g. tickets:read without giving full RPC access.
Outbound webhooks — lynx.api.webhook subscriptions with HMAC-SHA256 signatures, exponential-backoff retry queue, dead-letter handling, and per-delivery audit; emit_event() helper for bridges to fire events from create/write/unlink.
Premium-gated — every framework call requires the api.access premium feature; the /openapi.json and /docs routes are intentionally public so prospects can introspect the surface before buying.
Depends on
Try Lynx API on your team.
Free trial, no credit card. Talk to sales when you're ready.