Hello,
I’m trying to write a script to init a Bonita server automatically. The aim of this script is to :
- import my organization
- import my bdm
- import processes
- import an application and related pages
First of all, i’d like to create a user with the ‘install’ technical user. To do this, I’m doing an HTTP Post request on http://localhost:8080/bonita/API/identity/user/. I set Content-Type to application/json, set Authorization to use the ‘install’ user and pass the following body :
{“enabled”:“true”,“userName”:“deploy”,“password”:“deploy”,“password_confirm”:“deploy”,“firstname”:“Deploy”,“lastname”:“User”}
When I make this HTTP request from REST Client, it works. When I make this HTTP request from my nodeJS script, I get a 401 HTTP status (this script uses request module). I’ve also tried to make my request with curl but got the same result (401).
In my script, I’ve also tried to make a call to loginservice to get the Bonita cookie and pass this cookie to my POST request but it does’nt work either.
I’m using Bonita 7.2.2.
Is it possible to make a call to Bonita REST API using basic HTTP authentication ?
Do you a way to do what I want to do ? Perhaps, you have an example…
Thanks in advance for your help.
Mickaël