If an organization has introduced keyboard emulated card for secure print release and wants to update all existing users with new card details or replace old cards with new card details - then this article would help you.
If there is a need to import bulk users with new card details or replace card numbers then please follow the below instructions..
- Write a shell (for Linux) or power-shell script (for Windows) following HCP API documentation and run it. This script should read data from a CSV file and import directly to HCP.
For more information, please get in touch in HCP API documentation:
- Download our readymade shell script and do the necessary adjustment before running and upload user information from local CSV file.
We would focus more on the second point here:
- Download EveryonePrint script: HCP_Update_CardNo_API.sh
- Open the file in Notepad++ (or other word editor) in Windows and change the following:
- Change hcpserver=”HCP_Primary_Account_DNS_address” #CHANGE HCP ACCOUNT DOMAIN NAME
- Change the INPUT with user details contained CSV file (the script and the CSV file should be in the same directory while running)
- Specify the columns in the CSV and mention them in line 51: making sure that the script reads all columns and get the data.
- Update the curl command with username and card details
Note: To update card details, username should be present in the CSV for mapping. Otherwise the API would not help to do proper update.
- Run dos2unix command to the CSV file (dos2unix abc.csv)
Finally place the shell script and the CSV file in the Linux server (within same directory), provide permission to run (sudo chmod 755 HCP_Update_CardNo_API sh) and then run the script. All the user details would be updated in HCP.