Skip to content
SupportLogin

Complete a batch upload and trigger processing

POST/api/v1/datasets/upload/complete-batch

Any TXT files in the batch are converted to csv/jsonl. Batches that still contain documents (pdf/docx/pptx/xlsx/html, or unpacked zip contents) move to awaiting_preprocessing and wait for an explicit launch-preprocessing call. Batches with only tabular formats (csv/json/jsonl/parquet, plus any converted-from-TXT files) move directly to column extraction.

Body ParametersJSONExpand Collapse
dataset_id: string

Dataset ID from initiate-batch

files: array of object { s3_key, file_name, file_format, file_size_bytes }
s3_key: string

S3 key returned from initiate-batch

file_name: string

Original file name

file_format: "csv" or "json" or "jsonl" or 8 more

File format

One of the following:
"csv"
"json"
"jsonl"
"parquet"
"pdf"
"docx"
"pptx"
"xlsx"
"html"
"zip"
"txt"
file_size_bytes: number

File size in bytes

defer_adaption: optional boolean

When true, the upload is stored but Adaptive Data does not start. The dataset stays in awaiting_preprocessing until POST /datasets/:id/start-adaption.

ReturnsExpand Collapse
dataset_id: string

Dataset ID

status: string

Current dataset status

Complete a batch upload and trigger processing

curl https://api.prod.adaptionlabs.ai/api/v1/datasets/upload/complete-batch \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $ADAPTION_API_KEY" \
    -d '{
          "dataset_id": "dataset_id",
          "files": [
            {
              "s3_key": "s3_key",
              "file_name": "file_name",
              "file_format": "csv",
              "file_size_bytes": 0
            }
          ]
        }'
{
  "dataset_id": "dataset_id",
  "status": "status"
}
Returns Examples
{
  "dataset_id": "dataset_id",
  "status": "status"
}