REST API Common Controller
Project description
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 this controller 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file odoo-addon-api_common_base-16.0.1.0.0.tar.gz
.
File metadata
- Download URL: odoo-addon-api_common_base-16.0.1.0.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fae68c9511c877292c91886eeafd92975bbed044a5187f17ab4667554f7374ee |
|
MD5 | 3724ed088472efce2c13b2dd69ccc769 |
|
BLAKE2b-256 | 6116caebda5e022653855d762be365a87bfb0013ad7bed57cf99eb529f3a96c9 |
File details
Details for the file odoo_addon_api_common_base-16.0.1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: odoo_addon_api_common_base-16.0.1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06a563332acb45671c8ea7feca5ab94f9226df117966123056369c1b8adf8e95 |
|
MD5 | 8ab05d2107dc75f1a6fab2f6c9082d41 |
|
BLAKE2b-256 | 4adb8019671227822d71a51bcbe5f2bd63d81aeeb5fc681f22fd4bfa7a692840 |