filename, declaredSizeBytes, and an optional format and field mapping. Files may be up to 1 GiB. Returns an upload and uploadUrl. PUT the file bytes to that URL with the required x-ms-blob-type: BlockBlob header. After the PUT succeeds, finalize the upload. The file must not exceed its declared size.
Signature
Method signature onclient.datasets:
Parameters
string
required
Dataset ID with prefix
ds..string
required
Name of the file being uploaded.
"json" | "csv" | "jsonl"
default:"json"
File format: “json” (a JSON array of row objects), “jsonl” (one JSON object per line) or “csv” (a header row naming the fields, one row per item; all values are ingested as strings). Defaults to “json”.
number
required
Declared maximum upload size in bytes, from 1 byte to 1 GiB.
{ name: string; jsonSchema?: undefined | JsonSchema }[]
Additional fields to create from matching keys in uploaded rows. Each complete row is also stored in “uploaded”; existing profile mappings still apply.
Returns
Promise<{ job: UploadJob; uploadUrl: string }>
UploadJob
required
A dataset upload and its import status. After finalizing, poll until
status is succeeded or failed.string
required
Signed URL for uploading file bytes with a PUT request and the
x-ms-blob-type: BlockBlob header.Errors
HTTP errors throwPotatoApiError. The endpoint documents these error responses:
HTTP endpoint:
POST /datasets/{datasetId}/uploads.