Data Sources API

Create, list and delete data source connections.

Data sources are always scoped to the workspace in the X-Tenant-ID header.

List sources

GET/api/datasource/datasources/Auth required

Returns a paginated list of sources in the active workspace.

Example
curl https://api.introzen.com/api/datasource/datasources/ \
  -H "X-Tenant-ID: 42" \
  -b cookies.txt

Create a source

POST/api/datasource/datasources/Auth required

Send multipart/form-data when uploading a file, or JSON when registering an API endpoint.

File upload
curl -X POST https://api.introzen.com/api/datasource/datasources/ \
  -H "X-Tenant-ID: 42" \
  -b cookies.txt \
  -F "source_name=monthly_sales" \
  -F "source_type=csv" \
  -F "status=active" \
  -F "file=@sales.csv"

Extract a sample

POST/api/datasource/datasources/extract-sample/Auth required

Parses an uploaded file and returns the detected columns plus sample rows. Nothing is persisted.

Delete a source

DELETE/api/datasource/datasources/{id}/Auth required

Removes the source and its stored file. Blocked with 400 while pipelines still reference it.

Field reference

FieldTypeDescription
source_namestringDisplay name, unique within the workspace.
source_typeenumcsv, json or api.
statusenumactive, inactive or error.
filefileUploaded artifact for csv and json sources.
file_sizeintegerSize of the stored artifact in bytes. Read-only.
endpoint_urlurlRequired for api sources.
auth_tokenstringOptional bearer token for api sources.
columnsstring[]Column names discovered from the stored file. Read-only; empty for remote sources. Drives the pipeline builder's column pickers.
created_atdatetimeRead-only creation timestamp.

Last reviewed October 2026.