Skip to content
Get started

Complete a file upload and trigger processing

datasets.upload.complete_by_id(strdataset_id, UploadCompleteByIDParams**kwargs) -> UploadCompleteByIDResponse
POST/api/v1/datasets/{dataset_id}/upload/complete

File uploads only. Call after uploading bytes to the presigned URL from POST /datasets. Verifies the file exists in S3, then triggers the preprocessing pipeline.

ParametersExpand Collapse
dataset_id: str
file_size_bytes: float

Size of the uploaded file in bytes (for verification)

minimum0
maximum2147483648
sha256: Optional[str]

SHA-256 hex digest of the uploaded file (for integrity verification)

ReturnsExpand Collapse
class UploadCompleteByIDResponse:
dataset_id: str

ID of the dataset

status: str

Current status of the dataset after completing upload

Complete a file upload and trigger processing

import os
from adaption import Adaption

client = Adaption(
    api_key=os.environ.get("ADAPTION_API_KEY"),  # This is the default and can be omitted
)
response = client.datasets.upload.complete_by_id(
    dataset_id="dataset_id",
    file_size_bytes=1048576,
)
print(response.dataset_id)
{
  "dataset_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "processing"
}
Returns Examples
{
  "dataset_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "processing"
}