DocumentationGet Multipart Part URLs
Get Multipart Part URLs
Request presigned URLs for uploading file parts. Call this after creating the upload to get URLs for each file part.
Endpoints
POST/api/videos/uploads/:jobId/files/:uploadId/part-urls
Get presigned URLs for file parts.
Request
curl -X POST "https://theamplium.com/api/videos/uploads/JOB_ID/files/UPLOAD_ID/part-urls" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"startPartNumber": 1,
"count": 3
}'Response
{
"uploadId": "a4d7985f-7a8d-4f9c-9d34-3b6264f02222",
"layout": "AIV",
"partSizeBytes": 104857600,
"totalParts": 3,
"parts": [
{
"partNumber": 1,
"byteStart": 0,
"byteEnd": 104857599,
"url": "https://signed-r2-url.example/part-1"
},
{
"partNumber": 2,
"byteStart": 104857600,
"byteEnd": 209715199,
"url": "https://signed-r2-url.example/part-2"
},
{
"partNumber": 3,
"byteStart": 209715200,
"byteEnd": 249999999,
"url": "https://signed-r2-url.example/part-3"
}
]
}Error Response
When an error occurs, the API returns a JSON response with this structure:
{
"error": "BadRequest",
"message": "isEncode must be true or false."
}HTTP Error Codes
| Code | Error Type |
|---|---|
| 400 | BadRequest |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | NotFound |
| 413 | PayloadTooLarge |
| 415 | UnsupportedMediaType |
| 500 | InternalServerError |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startPartNumber | integer | Required | First part number to request. Must be a positive integer. |
| count | integer | Required | Number of part URLs to return. Must be a positive integer. |
Next Steps
After receiving the presigned URLs:
- Upload each part with PUT to its URL.
- Save the response ETag header for every part.
- Use the saved ETags when calling the Complete Upload endpoint.