OdooWiki OCA HUB

Base Rest Auth Api Key

base_rest_auth_api_key folder_open OCA/rest-framework open_in_new
Uncategorised License: LGPL-3

This technical addon extend base_rest to add the support for auth_api_key authentication mechanism into the generated openapi documentation.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds API key security information to the automatically generated OpenAPI documentation of REST services, so developers see that an API-KEY header is required.

This module is a technical bridge between the REST framework and the API key authentication module. It does not add menus, buttons, or screens for everyday users; its effect is visible in the OpenAPI documentation that Odoo generates for REST services.

When a REST service builds its API specification, this module registers an extra documentation plugin. That plugin declares a security scheme named api_key that expects an API key sent in an HTTP header called API-KEY.

For each documented operation, the plugin checks the authentication setting of the route. If the route uses api_key, or uses public_or_default while the service default is api_key, the operation is marked as requiring the api_key security scheme. Other routes are left unchanged.

The module extends the base.rest.service component and overrides its _get_api_spec method to attach the plugin. It depends on base_rest and auth_api_key, and it installs automatically when both are present. It also requires the Python apispec library.

In short, it keeps the generated API documentation accurate for services protected by API keys, which helps integrators understand how to authenticate their calls.

Models and fields (1)
  • base.rest.service · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/rest-framework.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.