Connecting to an Axelor’s instance
For using the Axelor Rest API You can refer to the axelor documentation in the official site for creating your requests and connecting to axelor instance .
How get A specific Product in Axelor instance .
In this example we want to retrieve a product data by sending a request to an axelor instance.
It is a connector with one request of type GET
. It will fetch the product by a specific ID .
The web service is accessible with following url pattern:
GET /ws/rest/:model/:id
GET /ws/rest/com.axelor.apps.base.db.Product/1 HTTP/1.1 Accept: application/json
Authentication
We have to create an authentication to connect with an axelor instance .
it’s a custom authentication used , We need to provide a username
and a password
to be authenticated .
the request of authentication is :
The authentication is a basic and the token is stored in the cookies , so we chose the cookie option . By click on the authenticate button , you can test if the authentication is correct or not .
Get product request
To get a product by id , you can send a request to :
GET : baseUrl/com.axelor.apps.db.Product/{productID}
You can provide the product id via a context , by passing the product context in the BPM Connector script . every dynamic value must donate by ${} , it is processed by a groovy template . |