Managing User Data in Staging Environments with FusionAuth's Bulk APIs
-
In our staging (non-production) environment, we need to remove all users daily and re-import them from scratch. We are considering using the Bulk Delete API and Bulk User Import API for this process.
- Will using the Bulk User Import API count against our monthly active users (MAU) quota?
- Deleting users seems to take longer than re-importing them. Is there a more efficient method you recommend?
-
- Monthly Active Users (MAU):
Using the Bulk User Import API will not count against your monthly active users (MAU) quota. This makes it suitable for staging or non-production environments where users are frequently added and removed. - User Deletion Performance:
The Bulk Delete API processes users one by one, performing verification checks for each user, which can cause delays. Unfortunately, there is currently no faster or more efficient way to delete users in bulk due to the way the API is designed.
- Alternative Approach:
While tools like Terraform can automate the process of importing and deleting users, this essentially scripts the same API calls and will still encounter the same deletion delays. However, Terraform may simplify managing the environment by automating repetitive tasks.- Documentation: FusionAuth Terraform Integration
If the deletion delays significantly impact your workflow, consider submitting a feature request to FusionAuth for performance improvements in bulk deletion.
- Monthly Active Users (MAU):
-