Uploads
Upload files, then load them into a table by upload ID. You PUT the bytes straight to the URLs Hotdata returns, not through this API.
Upload flow
POST /v1/uploadsreturns a one-timefinalize_tokenand either oneurl(mode: single) orpart_urls(mode: multipart). If you omitdeclared_size_bytes, you getmode: multipartwith apart_sizebut nopart_urls; get them fromPOST /v1/uploads/{upload_id}/partsas you go.PUTthe whole file tourl, or each part to its URL. Keep each part'sETag.POST /v1/uploads/{upload_id}/finalizewith the token and, for multipart, the partETags.
To upload many files, POST /v1/uploads/batch creates up to 100 sessions in one call. Large files get a multipart upload, which you can send in parallel.
Create upload session
/v1/uploadsStart an upload. You PUT the file straight to the URLs in the response, not through this API. The response has a one-time finalize_token and one of three shapes:
mode: single:PUTthe whole file tourl.mode: multipartwithpart_urls: split the file intopart_size-byte parts (the last one is smaller) andPUTpart i topart_urls[i - 1]. Keep each part'sETag.mode: multipartwith nopart_urls, when you omitdeclared_size_bytes: get part URLs as you go fromPOST /v1/uploads/{upload_id}/parts.
Then call POST /v1/uploads/{upload_id}/finalize, and load the upload into a table by its ID.
An upload can be at most 16 GiB by default. With declared_size_bytes, a larger file is refused here; without it, at finalize. To load more into one table, split the data and load each upload with mode: append. A 501 PRESIGN_UNSUPPORTED means upload URLs are not available; send the data inline on the load endpoint.
Request body
| Name | Type | Description |
|---|---|---|
checksum_algo | string | Checksum algorithm for checksum_value. Only sha256 is accepted. |
checksum_value | string | Checksum of the file. Stored with the upload but not verified. |
content_encoding | string | Content encoding, such as gzip, kept with the upload. |
content_type | string | MIME type of the file. A load uses it to detect the file format when format is not set. |
declared_size_bytes | integer | Exact file size in bytes, checked again when you finalize. Omit it to stream a file of unknown size and get part URLs from POST /v1/uploads/{upload_id}/parts as you go. |
filename | string | File name, kept for your reference. It does not affect the upload or load. |
part_size | integer | Preferred part size in bytes for a multi-part upload. Hotdata adjusts it to the allowed range; the size it uses is returned as part_size. |
Example request
{
"checksum_algo": "sha256",
"checksum_value": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"content_type": "application/vnd.apache.parquet",
"declared_size_bytes": 10485760,
"filename": "orders.parquet",
"part_size": 8388608
}
Response 201 — Upload session created
| Name | Type | Description |
|---|---|---|
finalize_token (required) | string | Token to send in the X-Upload-Finalize-Token header when you request part URLs or finalize. Returned only once. |
headers (required) | object | Headers to send with each PUT. Currently always empty. |
mode (required) | string | single: PUT the whole file to url. multipart: PUT each part to its own URL. |
part_size | integer | For a multipart upload, the size of every part except the last, in bytes. Split the file by this size, not evenly by part count, or a part may fall under the 5 MiB minimum and finalize fails. |
part_urls | string[] | For a multipart upload of known size, one URL per part, in order: PUT part i to part_urls[i - 1] and keep each response's ETag for finalize. Absent for a streaming upload. |
upload_id (required) | string | ID of the upload. Use it to finalize the upload and then to load it. |
url | string | URL to PUT the file to, for a single upload. Expires soon. |
Example response
{
"finalize_token": "string",
"headers": {},
"mode": "string",
"part_size": 0,
"part_urls": [
"string"
],
"upload_id": "string",
"url": "string"
}
Errors
| Status | Description |
|---|---|
400 | Invalid request, such as a file that is too large or an unsupported checksum algorithm |
501 | This deployment cannot issue upload URLs |
Create upload sessions in bulk
/v1/uploads/batchCreate upload sessions for up to 100 files in one request. Sessions come back in the order of the request. Upload and finalize each one on its own.
The 16 GiB size limit applies to each file. If any file is refused, no sessions are created; retry the whole request. A 501 PRESIGN_UNSUPPORTED means upload URLs are not available.
Request body
| Name | Type | Description |
|---|---|---|
uploads (required) | CreateUploadRequest[] |
Fields of uploads
| Name | Type | Description |
|---|---|---|
uploads[].checksum_algo | string | Checksum algorithm for checksum_value. Only sha256 is accepted. |
uploads[].checksum_value | string | Checksum of the file. Stored with the upload but not verified. |
uploads[].content_encoding | string | Content encoding, such as gzip, kept with the upload. |
uploads[].content_type | string | MIME type of the file. A load uses it to detect the file format when format is not set. |
uploads[].declared_size_bytes | integer | Exact file size in bytes, checked again when you finalize. Omit it to stream a file of unknown size and get part URLs from POST /v1/uploads/{upload_id}/parts as you go. |
uploads[].filename | string | File name, kept for your reference. It does not affect the upload or load. |
uploads[].part_size | integer | Preferred part size in bytes for a multi-part upload. Hotdata adjusts it to the allowed range; the size it uses is returned as part_size. |
Example request
{
"uploads": [
{
"filename": "orders.csv",
"declared_size_bytes": 4096,
"content_type": "text/csv"
},
{
"filename": "customers.csv",
"declared_size_bytes": 2048,
"content_type": "text/csv"
}
]
}
Response 201 — Upload sessions created
| Name | Type | Description |
|---|---|---|
uploads (required) | UploadSessionResponse[] |
Fields of uploads
| Name | Type | Description |
|---|---|---|
uploads[].finalize_token (required) | string | Token to send in the X-Upload-Finalize-Token header when you request part URLs or finalize. Returned only once. |
uploads[].headers (required) | object | Headers to send with each PUT. Currently always empty. |
uploads[].mode (required) | string | single: PUT the whole file to url. multipart: PUT each part to its own URL. |
uploads[].part_size | integer | For a multipart upload, the size of every part except the last, in bytes. Split the file by this size, not evenly by part count, or a part may fall under the 5 MiB minimum and finalize fails. |
uploads[].part_urls | string[] | For a multipart upload of known size, one URL per part, in order: PUT part i to part_urls[i - 1] and keep each response's ETag for finalize. Absent for a streaming upload. |
uploads[].upload_id (required) | string | ID of the upload. Use it to finalize the upload and then to load it. |
uploads[].url | string | URL to PUT the file to, for a single upload. Expires soon. |
Example response
{
"uploads": [
{
"finalize_token": "string",
"headers": {},
"mode": "string",
"part_size": 0,
"part_urls": [
"string"
],
"upload_id": "string",
"url": "string"
}
]
}
Errors
| Status | Description |
|---|---|
400 | Invalid request, such as a file that is too large or an unsupported checksum algorithm |
501 | This deployment cannot issue upload URLs |
Finalize upload
/v1/uploads/{upload_id}/finalizeConfirm that a file is uploaded, so it can be loaded into a table. Send the finalize_token in the X-Upload-Finalize-Token header. For a multipart upload, send the {part_number, e_tag} list.
If you declared a size, the file must match it. An upload without a declared size must not be empty and must be at most 16 GiB by default. You can finalize an upload only once. Load it within 7 days (by default), or it is deleted.
Path parameters
| Name | Type | Description |
|---|---|---|
upload_id (required) | string | Upload ID |
Headers
| Name | Type | Description |
|---|---|---|
X-Upload-Finalize-Token (required) | string | The finalize_token from the create response |
Request body
| Name | Type | Description |
|---|---|---|
parts | FinalizeUploadPart[] | Every uploaded part, for a multipart upload. |
Fields of parts
| Name | Type | Description |
|---|---|---|
parts[].e_tag (required) | string | ETag header returned by the part's PUT. |
parts[].part_number (required) | integer | Part number, starting at 1. |
Example request
{
"parts": [
{
"e_tag": "\"9f8c1e5b7a2d4f60b3c8e1a9d7f4b206\"",
"part_number": 1
}
]
}
Response 200 — Upload finalized
| Name | Type | Description |
|---|---|---|
content_type | string | |
created_at (required) | string | |
size_bytes (required) | integer | Size of the uploaded file in bytes. |
status (required) | string | |
upload_id (required) | string |
Example response
{
"content_type": "string",
"created_at": "2026-01-01T00:00:00Z",
"size_bytes": 0,
"status": "string",
"upload_id": "string"
}
Errors
| Status | Description |
|---|---|
400 | Missing token header, a size that does not match, no uploaded file, or an upload that cannot be finalized (for example, already finalized) |
404 | Upload not found, or the token does not match it |
Mint upload part URLs
/v1/uploads/{upload_id}/partsGet upload URLs for parts of a multipart upload. You need this for an upload created without declared_size_bytes. You can also use it to get a new URL for a part whose URL expired.
Send the finalize_token in the X-Upload-Finalize-Token header and the part numbers (starting at 1), up to 100 per request. PUT each part to its URL, keep its ETag, and pass the list to finalize.
Path parameters
| Name | Type | Description |
|---|---|---|
upload_id (required) | string | Upload ID |
Headers
| Name | Type | Description |
|---|---|---|
X-Upload-Finalize-Token (required) | string | The finalize_token from the create response |
Request body
| Name | Type | Description |
|---|---|---|
part_numbers (required) | integer[] | Part numbers, from 1 to 10000, at most 100 per request. |
Example request
{
"part_numbers": [
1,
2,
3
]
}
Response 200 — Minted part URLs
| Name | Type | Description |
|---|---|---|
parts (required) | MintedUploadPartResponse[] | One URL per requested part, by part number. |
Fields of parts
| Name | Type | Description |
|---|---|---|
parts[].part_number (required) | integer | Part number, starting at 1. |
parts[].url (required) | string | URL to PUT the part to. Expires soon. Keep the response's ETag for finalize. |
Example response
{
"parts": [
{
"part_number": 0,
"url": "string"
}
]
}
Errors
| Status | Description |
|---|---|
400 | Missing token header, invalid part numbers, more than 100 parts, or not a multipart upload |
404 | Upload not found, or the token does not match it |
501 | This deployment cannot issue upload URLs |