There's a rest API.. which I need to call. Post Call - it has a payload
{ "name" : <<value_in_excel>>,
"something" : "all rest values are fixed"
}
There are 100,000 values for name attributes in an Excel/CSV. One API call takes 800ms-1sec.
How can I make this bulk call?
Reading excel file by excel.js and call to create user by POST call using Axios library.
Overview steps
This is demo code.
File Structure
Save as 'create_user.js'
Run it
This is result.
Install Dependencies
Save as 'package.json'
Install dependencies
This is create 100K users by fake.js
Save as 'save_excel.js'
Create excel file
Excel result
Terminal
I created 100K by fake.js. To avoid username and email code too.
This is launch Keycloak by docker compose
Launching Keycloak
Create 'my-realm' by manual
Increase Master Token Lifespan
More detail information
Create 100K users by Fake user name https://fakerjs.dev/api/person.html
Reading Excel by excel.js https://www.npmjs.com/package/exceljs
Get master token for Keycloak Keycloak v.18: How to manipulate with users using Keycloak API
Create user by POST call for Keycloak Is it possible to create new user with jboss/keycloak:16.1.1using REST APIs?