Skip to end of banner
Go to start of banner

Adding Dashboard Users from a CSV

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

This article will show you how to add users to a dashboard from a CSV file using Postman.

Postman

Postman is a free utility that works with API calls. You can download & install or use the online version. Register and you’re away.

The Panintelligence dashboard contains an API which we will utilise.

The general approach is that we will create a collection of API requests that belong in single folder, we will then “present” a CSV file to the collection, which for every row, it will iterate once through the series of requests.

The requests will contain variable placeholders for each of the columns in the CSV file.

The file we will be using is a simple CSV with just 10 rows, containing User Information

We will use WorkID as username, important to note the use of UserType.

We also need to ensure we have existing Roles that match the RoleIDs provided. Included are two user variables .

image-20241105-100848.png

Examining the variables, we have enough information to:

  1. Create a user of UserType

  2. Add new user to a Role

  3. Create 2 User Variables

In Postman, we need to create a Collection (folder), with 4 requests:

image-20241106-114723.png

🛠️ Start Postman

  • Create a New Collection - Call it Create Users From CSV

    image-20241106-120740.png

  • Authorisation - we will put authorisation into the requests so no need to change anything in the collection authorisation tab.

  • Select the Variables tab

    • Add variables for orgId and parentId (capital i’s !) and set both appropriately (likely to be 1)

  • Now on to creating the requests.

    • Click the 3 dots alongside the Create Users From CSV Folder and then click Add Request

      image-20241106-131137.png

  • Run

  • Run the Collection - Click the 3 horizontal dots alongside the folder Create Users From CSV

    image-20241106-132644.png

    • This will then show the Postman Runner screen

      image-20241106-132952.png

      The Run manually radio button will be selected by default, so just click on the Data File : Select File button (highlighted above in yellow) and select your CSV file.

Be aware that you have limited “Runs” on the free tier within Postman indicated at the bottom of the image above !

  • Upon selecting a file, the runner will inspect the row count and set the iterations.

    image-20241106-133624.png

    A preview button will also be available - give it a try, it will reveal your CSV and give you the opportunity to set the data type.

    image-20241119-110359.png

  • Once you are happy, close the preview and click the Run button.

Check you dashboard that the users have been created.

  • No labels