Availability |
Odoo Online
Odoo.sh
On Premise
|
Technical Name |
smile_api_rest |
License | AGPL-3 |
Website | http://www.smile.fr |
Versions | 10.0 11.0 14.0 15.0 |
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
Report comment
Any abuse of this reporting system will be penalizedWARNING: before calling /api/auth, call /web?db=*** otherwise web service is not found.
Why do we need to do this? How to handle it at the android app end? Thanks
if you module doesn't work
may be you should add the module name to server_wide_module in your odoorc
hiii
2.can i use API in Android App & Can this api support string values ???
/api/auth
/api/<model>
/api/<model>/<id>
/api/<model>
/api/<model>/<id>
/api/<model>/<id>
/api/<model>/<id>/<method>
{
How do we use fields variable in the get request
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.
How to get CSRF token
Hi, The module works great. But, how do we get the csrf token. It keeps giving the error {"error": "'auth'"} Thanks.
Download for 11.0 broken link
11.0 version link doesn't work