This module allows to store request and response logs for any API.
When a response is logged, the header API_LOG_ENTRY_ID is injected in the response header. This header stores the identifier of the log record produced from the response.
A scheduled action "API Log: Delete old logs" is available to automatically delete old API log records. It is disabled by default.
To enable it, go to Settings > Technical > Automation > Scheduled Actions and activate "API Log: Delete old logs".
The retention period (in days) is configurable through the system parameter api_log.retention_days, which defaults to 180 days. Logs with a request_date older than this threshold are deleted when the cron runs.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Stores API requests, responses and errors in the database so they can be reviewed in Odoo. Users with the API Log Access group can browse, search and filter these logs from a dedicated menu.
This module records the traffic of APIs built on Odoo: each call is saved as a log entry with its URL, method, headers, body, date, status code and duration.
Where it appears: - A new "API Log" menu (under a Tools parent menu) opens a list of log entries with date, method, URL, status code and duration. - The form view shows the request side (URL, method, headers, content, date) and the response side (status code, headers, content, date), plus the linked business record and any error trace. - Search filters let users show only successful calls (status 200-299) or errors (status 400 and above), and group entries by collection, method or URL.
Automatic behaviours: - Sensitive header values such as API keys and cookies are replaced by "<redacted>" before being stored. - When a response is logged, an API-Log-Entry-ID header is added to the response so the caller can find the matching log entry. - A scheduled job (inactive by default) deletes logs older than a retention period, set to 180 days by default in a system parameter. - Models can opt in to logging and get a "Logs" button that opens only their own log entries.
Access is read-only and limited to the API Log Access group, which includes the administrator accounts.
Depends on
Required by other modules
Menus it adds
Models and fields (2)
- api.log · new modelname, time, referrer, request_b64 (Request Content), request_url, stack_trace, request_body, request_date, request_time, response_b64 (Response Content), collection_id, response_body, response_date, response_time, collection_ref, request_method, request_headers, request_preview, collection_model, response_headers, response_preview, request_content_type, response_status_code, response_content_type, request_content_length, request_headers_preview, response_content_length, response_headers_preview
- api.log_collection.mixin · new modellog_ids (Logs), log_requests
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-03Confirmation status: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/rest-framework.
terminal Installation and usage
No verified informationInstallation 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.
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.