Skip to main content
Sisense Community logo
  • Community Feedback
  • Chapters
  • Events
  • Forums
    • Help and How To
    • Product Feedback Forum
    • Strategy & Use Cases
  • Blogs
  • KB Docs
    • KB Docs
    • Add-Ons & Plug-Ins
    • APIs
    • Best Practices
    • Blox
    • CDT
    • Cloud Managed Service
    • Data Models
    • Data Sources
    • Embedding Analytics
    • How-Tos & FAQs
    • Onboarding
    • PySisense
    • Security
    • Sisense Administration
    • Sisense Intelligence & AI
    • Troubleshooting
    • Widget & Dashboard Scripts
  • Support
  • Learning
    • Sisense Academy: Free Courses and Certifications
    • Official Developer Documentation
    • Official Product Documentation
    • Official Sisense Youtube Channel
    • Sisense Compose SDK Playground
  • Use Case Gallery
All PostsDiscussionsBlogsIdeasQuestions
Leaderboards
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
  •                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
Discussions
  • Knowledge Base DocsChevronRightIcon
  • APIsChevronRightIcon
Creating users from a CSV file in bulk

Summary: intapiuser provides a detailed guide on how to add multiple users in bulk from a CSV file by converting it to JSON and using REST API through Swagger. The process involves preparing a CSV with specific columns, obtaining necessary role and group IDs using Swagger, converting the CSV to JSON, and executing the user addition in Swagger. The instructions are aimed at streamlining user management.

           

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):


  1. email - Users email

  2. userName - Same as the email

  3. firstName - User First Name

  4. lastName - User Last Name

  5. 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

  1. 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

  1. Use a utility to transform the CSV file into a JSON format. For example http://convertcsv.com/csv-to-json.htm)

Example:

 CSV form:

pic1.png

JSON form:

 pic2.png        

  1. paste the JSON expression in Swagger 1.0 -> Users-> Post-> /users/bulk and execute, then check the users and groups in Admin - > Users

pic3.png


intapiuser
By
intapiuser
Posted 3 years ago
                                       
         
0 comments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
               
                                                                                 
  •                                                              
  •                                                              
  •