Learn how to get the status of your CSV imports using the (New) CSV Import API.
CSV Imports is one of the easiest ways to import and sync user data into the Staffbase platform. Using the (new) CSV Import API makes it even easier to schedule automatic data syncs and keep your constantly evolving user database up to date.
In this article, we’ll look at how to check the status of your CSV imports using the (new)CSV Import API.
If you have frequent updates and want to streamline your import process, you can run a script to check the status of the update. This is helpful if you run parallel imports and want to check the status of each import in progress in order to monitor the import progress.
Make a GET
request to the endpoint /users/imports
.
In the response, you can see the status of the import in the parameter state
.
The following states are available for your import:
Import State | Description |
---|---|
DRAFT | The CSV file has been uploaded. |
PREVIEW_PENDING | The preview of the CSV file has been requested. |
CREATING_PREVIEW | The preview creation of the CSV file has been initiated. |
PREVIEW_READY | The preview creation of the CSV file has been successfully completed. |
IMPORT_PENDING | The import of the CSV file has been requested. |
IMPORTING | The import process has been initiated. |
COMPLETED | The import has been successfully completed. |
CANCELLED | The CSV import has been canceled, and the file has been removed. |
You have found the status of the import. Now, you can use this endpoint to queue your requests and trigger them one after the other.