/openapi

Odoo REST API / Open API (Swagger)

Primary LanguagePython

License: LGPL-3

REST API / Open API (Swagger)

Set up REST API and export Open API (Swagger) specification file for integration with whatever you need.

This module implements a /api/v1/ route tree.

Authentication

  • Server wide "break glass" through a salt in the config file
  • Database inference: Database name encoded and appended to the token
  • User authentication through the actual token

As a workaround for multi-db instances, system uses Basic Authentication with db_name:token credentials, where token is a new field in res.users model.

Customization

TODO

The module already includes configuration for the following models:

  • report
  • sale.order
  • sale.order.line
  • account.invoice
  • account.invoice.line
  • res.partner
  • product.template

TODO: Redefine ir.model to load default configuration on load

The module allows to configure

  • available models
  • available operations per model (CRUD)
  • enable/disable private methods through API
  • method whitelist
  • specification for the following operations
    • For reading ONE:
      • return field sets
    • For reading MULTI:
      • return field sets

Check Usage instruction for details.

Credits

Contributors

Sponsors

Maintainers

Further information

Demo: http://runbot.it-projects.info/demo/misc-addons/10.0

HTML Description: https://apps.odoo.com/apps/modules/10.0/openapi/

Usage instructions: doc/index.rst

Changelog: doc/changelog.rst

Notifications on updates: via Atom, by Email

Tested on Odoo 10.0 87b42ad9a887faacbbefcab9dd0703a5c51ce28b