Creating users from a CSV file in bulk
In some cases, you would like to add many users manually and in bulk and won't want to go through the process of entering one at a time.
With the following steps, you can insert users from a CSV file by converting the CSV file into a JSON format and run it with a REST API through the Swagger.
Steps:
Prepare a CSV file with the following columns (case sensitive):
-
- email - Users email
- userName - Same as the email
- firstName - User First Name
- lastName - User Last Name
- roleId - The role you would like to assign the user.
The possible roles are - admin, contributor, consumer and dataDesigner
You need to apply the roleId for each type of role.
Note that each Sisense installation has a different roleId for similar role names.
You can get the roleId for each role name by running the GET command in the Role group in Swagger 0.9.
Use the Swagger 0.9 -> roles -> Get -> to get each role’s id.
Or by running (while logged as an Admin) the following API call in the browser: http://localhost:8081/api/roles
-
groupId - The group id you want the user to be part of
Note: The groups must exist for this to work.
Use the Swagger 0.9 -> Groups -> Get -> Groups to get each group’s id.
Or by running (while logged as an Admin) the following API call in the browser: http://localhost:8081/api/v1/groups
Example:
CSV form:

JSON form:

- paste the JSON expression in Swagger 1.0 -> Users-> Post-> /users/bulk and execute.

- Check the users and groups in Admin - > Users
Updated 03-02-2023
intapiuser
Admin
Joined December 15, 2022