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
-
José Robles <jose.robles@somit.coop>
Álvaro García <alvaro.garcia@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 odoo12-addon-api_common_base-12.0.0.1.2.tar.gz
.
File metadata
- Download URL: odoo12-addon-api_common_base-12.0.0.1.2.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01905953deacdddf69a014751010a5984852eeafbd6814d461b12ef3928e552f |
|
MD5 | 8b3a8193b49b20b70e3e5fcebc862872 |
|
BLAKE2b-256 | 6ac8d6e49677bf48618f321f3d43d86631ba677cda6f13128334601e84cad6e1 |
File details
Details for the file odoo12_addon_api_common_base-12.0.0.1.2-py3-none-any.whl
.
File metadata
- Download URL: odoo12_addon_api_common_base-12.0.0.1.2-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f14d86188a29680611aa79ee4fe42599e1293782a2aec5912d4d20d7473ad8bb |
|
MD5 | 36350dc078c23df22edf4b9d7dd119bb |
|
BLAKE2b-256 | a34dd7e08a135c34064080a1472bb73f34f16adb1761aabb050c9f56d270c473 |