You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**content_encoding** | **str** | Content encoding to record for the uploaded file (for example `gzip`). Optional. | [optional]
12
12
**content_type** | **str** | Content type to record for the uploaded file (for example the Parquet, CSV, or JSON MIME type). Optional. | [optional]
13
-
**declared_size_bytes** | **int** | The exact size, in bytes, of the file you will upload. Validated at create time against the maximum allowed size, and again at finalize against the bytes actually stored — a mismatch fails the finalize. |
13
+
**declared_size_bytes** | **int** | The exact size, in bytes, of the file you will upload. Optional. When provided, it is validated at create time against the maximum allowed size, and again at finalize against the bytes actually stored — a mismatch fails the finalize. Omit it to create a streaming (unknown-size) upload: the session is always multi-part and returns no part URLs up front; instead you mint part URLs on demand from `POST /v1/uploads/{upload_id}/parts` as you upload, and finalize validates only that the file is non-empty. | [optional]
14
14
**filename** | **str** | Original file name, recorded with the upload for your own bookkeeping. Optional and advisory — it does not affect where the bytes are stored or how they are loaded. | [optional]
15
15
**part_size** | **int** | Preferred size, in bytes, of each part for a large (multi-part) upload. Optional hint — the service clamps it to the allowed part-size range and to the maximum number of parts, and ignores it for small files uploaded with a single `PUT`. Omit to let the service choose. | [optional]
Request body for `POST /v1/uploads/{upload_id}/parts`: mint presigned upload URLs for specific parts of a streaming (unknown-size) multi-part upload. Provide the 1-based part numbers you want URLs for. Mint parts as you upload, and re-request a part number if its URL expires before you finish — the parts you have already uploaded are unaffected.
**part_numbers** | **List[int]** | The 1-based part numbers to mint URLs for. Must be non-empty; each number must be between 1 and the maximum number of parts allowed. |
10
+
11
+
## Example
12
+
13
+
```python
14
+
from hotdata.models.mint_upload_parts_request import MintUploadPartsRequest
15
+
16
+
#TODO update the JSON string below
17
+
json ="{}"
18
+
# create an instance of MintUploadPartsRequest from a JSON string
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
**parts** | [**List[MintedUploadPartResponse]**](MintedUploadPartResponse.md) | The minted part URLs, in ascending part-number order. `PUT` each part's bytes to its URL and keep the response's `ETag` to pass to finalize. |
10
+
11
+
## Example
12
+
13
+
```python
14
+
from hotdata.models.mint_upload_parts_response import MintUploadPartsResponse
15
+
16
+
#TODO update the JSON string below
17
+
json ="{}"
18
+
# create an instance of MintUploadPartsResponse from a JSON string
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
**part_number** | **int** | The 1-based part number this URL is for. |
10
+
**url** | **str** | Short-lived URL to `PUT` this part's bytes to. Keep the response's `ETag` and pass the `{part_number, e_tag}` pair to finalize. |
11
+
12
+
## Example
13
+
14
+
```python
15
+
from hotdata.models.minted_upload_part_response import MintedUploadPartResponse
16
+
17
+
#TODO update the JSON string below
18
+
json ="{}"
19
+
# create an instance of MintedUploadPartResponse from a JSON string
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
Copy file name to clipboardExpand all lines: docs/UploadSessionResponse.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ Name | Type | Description | Notes
9
9
**finalize_token** | **str** | One-time token that authorizes finalizing this upload. Returned exactly once at create time — store it; it cannot be retrieved again. |
10
10
**headers** | **Dict[str, str]** | Headers you must send verbatim with each `PUT`. Currently always empty; present so a future mode can require signed headers without changing the response shape. |
11
11
**mode** | **str** | Upload mode: `single` (upload the whole file with one `PUT` to `url`) or `multipart` (upload each part with one `PUT` to the matching entry in `part_urls`). Modeled as a string so additional modes can be added later without breaking clients. |
12
-
**part_size** | **int** | For a `multipart` upload, the size in bytes to split the file into: send bytes `[(i-1) * part_size, i * part_size)`to `part_urls[i - 1]`, with the last part carrying the remainder. Slice by this value — do **not** divide the file evenly by `part_urls.len()`, which can make a non-final part smaller than the 5 MiB minimum that storage requires (the upload then fails at finalize). Absent for `single` uploads. | [optional]
13
-
**part_urls** | **List[str]** | For a `multipart` upload, the per-part URLs in ascending part order: `PUT` your file's part *i* (1-based) to `part_urls[i - 1]` and keep each response's `ETag`, then pass the `{part_number, e_tag}` list to finalize. Absent for `single` uploads. | [optional]
12
+
**part_size** | **int** | For a `multipart` upload (both known-size and streaming), the size in bytes to split the file into: send bytes `[(i-1) * part_size, i * part_size)`as part *i*, with the last part carrying the remainder. Slice by this value — do **not** divide the file evenly by the number of parts, which can make a non-final part smaller than the 5 MiB minimum that storage requires (the upload then fails at finalize). Absent for `single` uploads. | [optional]
13
+
**part_urls** | **List[str]** | For a known-size `multipart` upload, the per-part URLs in ascending part order: `PUT` your file's part *i* (1-based) to `part_urls[i - 1]` and keep each response's `ETag`, then pass the `{part_number, e_tag}` list to finalize. Absent for `single` uploads, and also absent for a streaming (unknown-size) `multipart` upload — there, mint part URLs on demand via `POST /v1/uploads/{upload_id}/parts`. | [optional]
14
14
**upload_id** | **str** | Identifier for this upload. Pass it to the finalize endpoint and to the managed-table load endpoint once finalized. |
15
15
**url** | **str** | The URL to `PUT` the raw file bytes to, for a `single` upload. Short-lived — upload promptly and finalize. Absent for `multipart` uploads (use `part_urls`). | [optional]
Create an upload session for a file you will send directly to storage. Based on the declared size, the response is one of two shapes. For a small file (`mode: single`) it contains a short-lived `url` to `PUT` the whole file to. For a large file (`mode: multipart`) it contains `part_urls` and `part_size`: split the file into `part_size`-byte chunks (the last is the remainder) and `PUT` chunk *i* (1-based) to `part_urls[i - 1]`, keeping each response's `ETag`. Slice by `part_size`, not by an even division across `part_urls.len()` (which can make a non-final part too small). In both cases the response also includes a one-time `finalize_token`. After uploading, call the finalize endpoint with the token (and, for multipart, the `{part_number, e_tag}` list) to make the upload usable as managed-table contents. The returned upload ID can then be passed to the managed-table load endpoint.
20
+
Create an upload session for a file you will send directly to storage. The response is one of three shapes. For a small file (`mode: single`) it contains a short-lived `url` to `PUT` the whole file to. For a large file with a known size (`mode: multipart`) it contains `part_urls` and `part_size`: split the file into `part_size`-byte chunks (the last is the remainder) and `PUT` chunk *i* (1-based) to `part_urls[i - 1]`, keeping each response's `ETag`. Slice by `part_size`, not by an even division across `part_urls.len()` (which can make a non-final part too small). For a file whose size you do not know up front, omit `declared_size_bytes`: the response is `mode: multipart` with a `part_size` but NO `part_urls`. As you stream, call `POST /v1/uploads/{upload_id}/parts` with a batch of `part_numbers` to mint per-part `PUT` URLs, `PUT` each part and keep its `ETag`, then finalize as for any multipart upload. In all cases the response also includes a one-time `finalize_token`. After uploading, call the finalize endpoint with the token (and, for multipart, the `{part_number, e_tag}` list) to make the upload usable as managed-table contents. The returned upload ID can then be passed to the managed-table load endpoint.
20
21
21
22
You may hint a preferred part size with `part_size`; the service clamps it to the allowed range and ignores it for single-`PUT` uploads.
22
23
@@ -198,7 +199,7 @@ Name | Type | Description | Notes
198
199
199
200
Finalize upload
200
201
201
-
Confirm that a file has been uploaded to storage and make it usable as managed-table contents. Supply the `finalize_token` returned when the session was created, in the `X-Upload-Finalize-Token` header. The uploaded file's size is validated against the size declared at create time; a mismatch is rejected. Finalize is exactly-once: a second finalize of the same upload is rejected.
202
+
Confirm that a file has been uploaded to storage and make it usable as managed-table contents. Supply the `finalize_token` returned when the session was created, in the `X-Upload-Finalize-Token` header. When you declared a size at create time, the uploaded file's size is validated against it and a mismatch is rejected. An upload created without a declared size is finalized from its uploaded parts; it must be non-empty and is rejected if it exceeds the server's maximum upload size. Finalize is exactly-once: a second finalize of the same upload is rejected.
202
203
203
204
### Example
204
205
@@ -368,6 +369,99 @@ Name | Type | Description | Notes
368
369
369
370
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
Mint short-lived presigned URLs for specific parts of a multi-part upload. This is required for a streaming (unknown-size) upload — created by omitting the declared size — which mints no part URLs up front. It also works for a known-size multi-part upload: use it to re-mint a part whose URL expired before you uploaded that part. Supply the `finalize_token` returned when the session was created, in the `X-Upload-Finalize-Token` header, and the 1-based `part_numbers` you want URLs for. `PUT` each part's bytes to its URL, keep each response's `ETag`, then pass the `{part_number, e_tag}` list to finalize. You may mint parts in batches as you upload, and re-mint a part number whose URL expired before you finished uploading it.
378
+
379
+
### Example
380
+
381
+
* Api Key Authentication (WorkspaceId):
382
+
* Bearer Authentication (BearerAuth):
383
+
384
+
```python
385
+
import hotdata
386
+
from hotdata.models.mint_upload_parts_request import MintUploadPartsRequest
387
+
from hotdata.models.mint_upload_parts_response import MintUploadPartsResponse
388
+
from hotdata.rest import ApiException
389
+
from pprint import pprint
390
+
391
+
# Defining the host is optional and defaults to https://api.hotdata.dev
392
+
# See configuration.py for a list of all supported configuration parameters.
393
+
configuration = hotdata.Configuration(
394
+
host="https://api.hotdata.dev"
395
+
)
396
+
397
+
# The client must configure the authentication and authorization parameters
398
+
# in accordance with the API server security policy.
399
+
# Examples for each auth method are provided below, use the example that
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
0 commit comments