Odoo REST API
Modify HTTP requests in Odoo!
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!
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).
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 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 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.
Highlighted-features
- Easily Create REST API Keys
- Generates a separate API key for end users
- Assign different access for multiple API Keys
- Added User Authentication for security
- Create& fetch records from DB
- Update or Delete records from the DB
- Get table schema
- Trigger Odoo actions
- View access rights message in endpoint response
Detailed Features List
Access or Modify Data Using HTTP Requests in Odoo
- The REST API module permits accessing and modifying data using HTTP requests.
- It allows you to create, fetch, update, and delete a record from the database by sending the appropriate request in JSON.
Response format for REST API in Odoo
- You can choose the response format as JSON or XML format (as needed).
- You can also request the schema of the table from the database.
Create API Keys to Access Endpoints
- The Odoo app allows you to create an API key to access the endpoints and set specific data access rights for different users.
- Same API key can be made available for different endpoint users.
Manage API keys and their Access Rights
- You can restrict specific access rights for different API keys.
- Also, you can view the access rights message in the endpoint response.
Improved Security with User Authentication
- User authentication ensures that only authorized users can access the API resources.
- It prevents data breaches, fraud, and other security risks.
Generating User Authentication Token
-
- You can create a user authentication token from the user profile in Odoo.
- Or you can provide encoded credentials in Postman to generate the authentication key.
(NOTE: For user authentication, you must encode the login credentials from Base64 in the given format. {‘login’:’admin’,’password’:’admin’})