REST API

by
Odoo 2
v 11.0 Third Party 302
Download for 11.0 series Deploy on Odoo.sh
You bought this module and need support ? Click here !
Technical name smile_api_rest
LicenseAGPL-3
Websitehttp://www.smile.fr
Repositoryhttps://github.com/Smile-SA/odoo_addons#11.0
Read description for v 10.0

License: AGPL-3 Smile-SA/odoo_addons

API Rest

This module provisions you with an API which allows you to access models through HTTP requests.

Table of contents

Requirements

There are no requirements to use this module.

Usage

Available URIs

URI Method Description
/api/auth POST Login in Odoo and set cookies
/api/<model> GET Read all (with optional domain, fields, offset, limit, order)
/api/<model>/<id> GET Read one (with optional fields)
/api/<model> POST Create a record
/api/<model>/<id> PUT Update a record
/api/<model>/<id> DELETE Delete a record
/api/<model>/<id>/<method> PUT Call method (with optional parameters)

WARNING: before calling /api/auth, call /web?db=*** otherwise web service is not found.

Error responses

Error response Description
{"error": "u'<model>'"} <model> does not exist or has a typo.
{"error": "<error_message>"} the python error message raised

Bug Tracker

Bugs are tracked on GitHub 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 here.

Do not contact contributors directly about support or help with technical issues.

Credits

Contributors

  • Corentin POUHET-BRUNERIE

Maintainer

This module is maintained by Smile SA.

Since 1991 Smile has been a pioneer of technology and also the European expert in open source solutions.

Please log in to comment on this module

  • This section is meant to ask simple questions or leave a rating.
  • This author can leave a single reply to each comment.
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Odoo
WARNING: before calling /api/auth, call /web?db=*** otherwise web service is not found.
by on

Why do we need to do this? How to handle it at the android app end? Thanks


Odoo
How do we use fields variable in the get request
by on

Hi, I added csrf=False in auth POST request and now it is working. however, I would like to know how do we pass fields variable in the GET request. Thanks.


Odoo
How to get CSRF token
by on

Hi, The module works great. But, how do we get the csrf token. It keeps giving the error {"error": "'auth'"} Thanks.


Odoo
if you module doesn't work
by on

may be you should add the module name to server_wide_module in your odoorc


Odoo
Download for 11.0 broken link
by on

11.0 version link doesn't work