Skip to main content
Version: Next

Data Import

The data import function allows users to batch create data by uploading Excel or CSV files.

Import Interface​

  • URL: /api/app/{entity-name}/import-excel
  • Method: POST
  • Content-Type: multipart/form-data
  • Parameters:
    • file: The binary file stream.

Processing Flow​

  1. Upload: The file is uploaded to the server.
  2. Parsing: The backend parses the Excel/CSV file content using libraries like MiniExcel or EPPlus.
  3. Validation: Validate the data of each row (format, required fields, duplication checks).
  4. Persistence: Valid data is converted into entity objects and saved to the database in batch.
  5. Feedback: Return the import result (number of successes, list of failures and reasons).

Error Handling​

If data validation fails, a detailed error report (or a downloadable error Excel file) is typically returned indicating which rows and columns have issues.