Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Odoo RPC, Xml RPC, JSON RPC and REST API in Odoo?

I'm confused between the concepts of Odoo RPC, XML RPC, JSON RPC, and REST API in the domain of Odoo. To my knowledge, these are the only 4 APIs that can be used in Odoo.

In Odoo's documentation, only xml rpc and json rpc are mentioned. But on this website: Odoo RPC They've discussed Odoorpc library. Fourth one is REST API, how does it fit in odoo? When we create a controller with a specific route, would it be called a REST API?

like image 741
Hussam Cheema Avatar asked Oct 19 '25 03:10

Hussam Cheema


1 Answers

RPC and REST are different approaches to how to call an API. RPC is a bit harder to use but more powerful, REST is easier but less powerful.

Odoo only has one API: RPC. Odoo has no REST API.

You can call Odoo's RPC it through XML-RPC or JSON-RPC, but the API is the same. Just use the format that best fits your other system. In case you don't care, go for JSON-RPC, which is the one odoo itself uses.

The docs you link are unofficial, and the odoorpc lib is another unofficial library that makes interacting with odoo API more comfortable. These are the official docs: https://www.odoo.com/documentation/14.0/webservices/odoo.html

like image 141
Yajo Avatar answered Oct 21 '25 19:10

Yajo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!