How can I log into bonita engine from external java application with APIClient?

I have a program in a different server but i need to acces some of the API-s of the bonita engine. How can i do that?

I already tried:

parameters.put("server.url", "http://URL:PORT");
parameters.put("application.name", "bonita");
APITypeManager.setAPITypeAndParams(ApiAccessType.HTTP, parameters);

org.bonitasoft.engine.api.APIClient apiClient = new APIClient();
apiClient.login("user", "password");

But I always get some error like:


Access to XMLHttpRequest at 'http://localhost:50129/bonita/API/bpm/humanTask/40098/execution' from origin has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Im trying to execute a task using Form External URL using another HTML5 framework , but that's what I get when I send the POST Request , what is the problem ?

how to download a csv file when clicking on a button widget


I'm trying to send some data in csv format from an application page when the user press a button.

I have a rest API method which is called when pressing the button. The code formats some data and should send them through the browser so that the user can download it.

I'm stuck when trying to send back the data, how should I format the response?

I get the following error right now :

login api

hello everyone

my code is :

Retrieve all tasks with their BDM values in one API


I have a list of tasks (~1000) and I'm trying to sort them with respect to their BDM values and a comparator function. For this, I'm iterating through each task, through an API for each task I'm retrieving it's BDM data, and with respect to this I'm sorting it. This takes a lot of time and is not practical. Is there a way I can decrease the number of API calls, get all tasks with their BDM values in one API call itself which could help me out?


usertask contract returns empty arrays

I've called '/API/bpm/userTask//contract' and it returned :
"inputs": [],
"constraints": []
but the task has many input fields in the view.
why the response is like that and what does this api must return?

How to add multiple memberships to multiple users

I am working on developing a membership assignment process.
admin can create multiple memberships of multiple users.

Until now, I couldn't find a proper API regarding the function.
Identity API is working with one user and one membership each.
I created a SQL connector and send query statement parameter to implement.
It is working well. However, I need to manipulate the table and put some dummy data.

API to list all the tasks of a process

Is there an API to list all the task of a process? I dont need to list the open cases, archived etc what I need is information of a process, to be able to list all the tasks that a process have.

I there any API that I can use to get that result?


How to get all members for a select widget

I have a problem, I read the documentation but could not get it work.

My instantiation form should show all employees so that the user can select from the select widget.

How can I load a group of users into a select widget? I tried using API but could not find the right line to do it.

Could someone point me to a good example or write the API how to load the usernames and Ids?

Thank you in andvance!

get all username

how to get all usernames in a single JSON array. Is there any API to get all usernames. Thanks in advance please help me.