This module uses OCAs REST API modules for creating endpoints based on a common controller called /api/. It allows you to expand all the different API endpoints from this particular controller.
Table of contents
Configuration
No configuration needed for this module.
Usage
To use this module it just needs to be installed and (from your own module) use their controllers directly from your services. Like so:
# -*- coding: utf-8 -*-
from odoo.addons.component.core import Component
class YourServiceAPI(Component):
_name = "your.model.api"
_inherit = "base.rest.service"
_usage = "yourEndpoint"
_default_auth = "api_key"
_collection = (
"api_common_base.services" # <-- that's where you'd use this module as a base
)
_description = """
Description of your endpoint
"""
def get(self): ...
After that you will see your endpoint available at the route: {odoo_base_url}/api/yourEndpoint/get
Also, the class APICommonBaseRestCase from tests/common_service.py can be inherited in API tests classes from dependent modules in order to use its basic common setup API methods (http_get, http_post, http_get_content).
Known issues / Roadmap
There are no known issues for this module.
Bug Tracker
Bugs are tracked on GitLab Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
-
Álvaro García <alvaro.garcia@somit.coop>
José Robles <jose.robles@somit.coop>
Juan Manuel Regalado <juanmanuel.regalado@somit.coop>
-
Gerard Funosas <gerard.funosas@somconnexio.coop>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Metadata
Release files for odoo-addon-api-common-base 16.0.1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| odoo-addon-api_common_base-16.0.1.1.1.tar.gz | 25.6 kB | Without provenance | Details |
Release files / odoo-addon-api_common_base-16.0.1.1.1.tar.gz
| Download URL | odoo-addon-api_common_base-16.0.1.1.1.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d7d1b8d2b5085c9381d3d8a4de55c63ef27292da35a430aa6b43b93616fae59
|
|
BLAKE2b-256 checksum How to use checksums |
3adf4389d44155b8fbc3acc55008294383a112952e68c467dcf0103f58f06844
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.12
|
Security for odoo-addon-api-common-base 16.0.1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.