v1

latestSwagger 2.0Apache 2.02026-07-1725956.5 KB
Data Import

Import CSV data

Import CSV data in chunks for large files. Requires that a file has been uploaded using the /upload endpoint first. Automatically resumes from last byte position. Use status=true to check import progress without processing data.

post/tables/import/{dbId}/{tableId}

Path parameters

dbIdstring required

Database ID

tableIdstring required

Table ID

Request body

statusboolean

If true, returns only import status without processing data (default: false)

max_timeinteger

Maximum execution time in seconds (default: 30, min: 10, max: 120). Processes as many rows as possible within this time.

delimiter'comma' | 'tab' | 'semicolon' | ',' | ';'

CSV delimiter - comma, tab, semicolon (default: comma)

Response

successful operation

statusstring

Example response

{
  "status": "success",
  "csv_info": {
    "csv_file_path": "mydb/mytable/data.csv",
    "file_size": 524288000,
    "file_size_mb": 500
  },
  "batch": {
    "rows_processed": 45000,
    "byte_offset_start": 12500000,
    "byte_offset_end": 15750000,
    "execution_time_seconds": 29.8,
    "execution_time_formatted": "00h:00m:29s"
  },
  "progress": {
    "total_rows_processed": 135000,
    "progress_percent": 25.5,
    "has_more": true
  },
  "next": {
    "byte_offset": 15750000,
    "endpoint": "http://example.com/api/tables/import/mydb/mytable",
    "message": "Call this endpoint again to continue import"
  }
}