Bulk Change Email domain
Last updated
Last updated
When domain names change, all of the users need to be updated. This pipeline asks for user input, demonstrates what actions it will take, updates the user table accordingly, and then outputs a report.
Using --help
to discover what inputs this command requires:
The only required parameter is --users:
The script will then ask you to input the values needed
It will then download from the API, and present the selected users that will potentially be changed:
As we can see, there are lots of active students with this email address. The next step will display the first 10 and last 10 records that will be changed (not real student information):
That gives us the confidence that it is doing example what we are expecting it to do.
The operation to make the necessary API calls (PATCH on /students/{id} endpoint) commenses, with a progress bar:
Once the operation is complete, it provides a simple table indicating status code:
Finally, it provides a report of all actions that were taken. In a support context, this report can be sent back to schools for confirmation: