get all username

1
+1
-1

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

1 answer

1
0
-1

Hello,

There is no API call to retrieve only usernames. Do not hesitate to go to this documentation page identity API.

a GET HTTP request enables you to retrieve a JSON, containing detailed information of the users.

If a tomcat is running locally on the 8080 port, the URL below can be used to retrieve up to 10000 users:

http://localhost:8080/bonita/API/identity/user?p=0&c=10000

UID FORM

Create a new variable with name allUsers, type External API, and value ../API/identity/user?p=0&c=10000

Create a second variable with type Javascript expression, value

var usernames = [];
for (var i=0; i<$data.allUsers.length; i++) {
      usernames.push($data.allUsers[i].userName);
}
return usernames;

Regards,
Jerome

Comments

Submitted by ramireddy.pingala on Tue, 03/12/2019 - 17:07

Hi Jerome,

thanks for reply actually from this we will get all the users from the organizations but I want only archieved usernames only.

For example i have three tasks user1 for step1 , user2 for step2 , user3 for step3 now I want user1 in step2 and also user1 and user2 in step3 . Thanks in advance.

Notifications