Skip to main content

API COMMON BASE

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

Authors

  • SomIT SCCL

  • Som Connexio SCCL

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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 odoo12-addon-api-common-base 12.0.0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for odoo12-addon-api-common-base 12.0.0.1.2
File Size Uploaded Provenance
odoo12-addon-api_common_base-12.0.0.1.2.tar.gz 21.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for odoo12-addon-api-common-base 12.0.0.1.2
File Interpreter ABI Platform
odoo12_addon_api_common_base-12.0.0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 46.6 kB

Release files / odoo12-addon-api_common_base-12.0.0.1.2.tar.gz

Download URL odoo12-addon-api_common_base-12.0.0.1.2.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
01905953deacdddf69a014751010a5984852eeafbd6814d461b12ef3928e552f
BLAKE2b-256 checksum
How to use checksums
6ac8d6e49677bf48618f321f3d43d86631ba677cda6f13128334601e84cad6e1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / odoo12_addon_api_common_base-12.0.0.1.2-py3-none-any.whl

Download URL odoo12_addon_api_common_base-12.0.0.1.2-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f14d86188a29680611aa79ee4fe42599e1293782a2aec5912d4d20d7473ad8bb
BLAKE2b-256 checksum
How to use checksums
a34dd7e08a135c34064080a1472bb73f34f16adb1761aabb050c9f56d270c473
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for odoo12-addon-api-common-base 12.0.0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page