Skip to main content
POST
Step 1 — Upload and analyze a sample file
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /source-creator/analyze Description: Uploads a CSV/TSV/XLSX sample file (multipart), parses headers and up to 20 sample rows, auto-detects delimiter/decimal separator/encoding, checks for existing matching sources by header similarity, and creates a new SourceCreatorSession (7-day expiry). XLSX files are accepted by the file filter but analysis is not yet implemented for them — the endpoint returns 400 for .xlsx uploads today. Rate limited via heavyOperationLimiter (file parsing is expensive). Authorization:
  • Required role: admin or higher
Method: POST (multipart/form-data)

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

multipart/form-data
file
file
required

CSV/TSV/XLSX file, max 10MB. Accepted mimetypes: text/csv, text/tab-separated-values, text/plain, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel (or matching .csv/.tsv/.txt/.xlsx/.xls extension).

delimiter
string

Override the auto-detected field delimiter.

decimalSeparator
string

Override the auto-detected decimal separator ("," or ".").

headerRows
integer

Override the number of header/prelude rows to skip before the real data header.

Required range: x >= 1

Response

File analyzed successfully

status
string
Example:

"success"

message
string
Example:

"File analyzed successfully"

data
object