ODOO REST API DOCUMENTATION


Introduction

The Rest API module creates Rest API for Odoo and allows accessing and modifying data using HTTP requests. The Odoo admin can fetch, create, update, and delete a record from the database by sending the appropriate request in JSON. The response can be in JSON or XML format. Also, the module can now perform user authentication for security.

REST API in Odoo REST API in Odoo!

A REST API refers to a Representational State Transfer Application Programming Interface. It’s an architectural style for creating APIs that use HTTP requests to access and modify data in Odoo. REST APIs are resource-oriented, stateless, cacheable, layered, and uniform interfaces.
The HTTP request lets you get, put, post, and delete data. This module allows you to access and modify data using HTTP requests in Odoo. You can update a record from the database according to your needs. The Odoo app permits you to send a request in JSON format and get the response in JSON or XML (as per configuration).

Purpose of REST API Purpose of REST API in Odoo

Odoo REST API is a powerful tool that can automate tasks, integrate Odoo with other applications, customize instructions, update processes, etc. Here are some of the specific purposes of the Odoo REST API:

  • REST API can help automate tasks like sending emails, creating invoices, and updating product prices. It aids in improving efficiency and saving time.
  • You can get, put, post, and delete data using the API to make processing more efficient.
  • It lets you alter or update specific records and can choose different types of functions for them (get, post, put, or delete).
User Authentication User Authentication for REST API

The module can now authenticate a user for API creation. User Authentication helps to know who created the REST API, its purpose, and for which actions. It adds a validation layer to protect data and ensures that only authorized users can access the API resources. Additionally, it helps prevent data breaches, fraud, and other security risks.

Creating API for All resources along with user authentication

Generating User Authentication Token