Get Part URLs for a Multipart Upload
curl --request POST \
--url https://blob.vertracloud.app/v1/uploads/{upload_id}/parts \
--header 'Content-Type: application/json' \
--data '
{
"part_numbers": [
123
]
}
'import requests
url = "https://blob.vertracloud.app/v1/uploads/{upload_id}/parts"
payload = { "part_numbers": [123] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({part_numbers: [123]})
};
fetch('https://blob.vertracloud.app/v1/uploads/{upload_id}/parts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://blob.vertracloud.app/v1/uploads/{upload_id}/parts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'part_numbers' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://blob.vertracloud.app/v1/uploads/{upload_id}/parts"
payload := strings.NewReader("{\n \"part_numbers\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://blob.vertracloud.app/v1/uploads/{upload_id}/parts")
.header("Content-Type", "application/json")
.body("{\n \"part_numbers\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/uploads/{upload_id}/parts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"part_numbers\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"part_number": 1,
"url": "https://storage.example/part-1",
"size": 67108864,
"headers": {
"content-length": "67108864"
}
}
]
}
Uploads
Get Part URLs for a Multipart Upload
Returns the upload URL for each requested part of a multipart upload, up to 100 parts per call. Accepts an upload token.
POST
/
v1
/
uploads
/
{upload_id}
/
parts
Get Part URLs for a Multipart Upload
curl --request POST \
--url https://blob.vertracloud.app/v1/uploads/{upload_id}/parts \
--header 'Content-Type: application/json' \
--data '
{
"part_numbers": [
123
]
}
'import requests
url = "https://blob.vertracloud.app/v1/uploads/{upload_id}/parts"
payload = { "part_numbers": [123] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({part_numbers: [123]})
};
fetch('https://blob.vertracloud.app/v1/uploads/{upload_id}/parts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://blob.vertracloud.app/v1/uploads/{upload_id}/parts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'part_numbers' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://blob.vertracloud.app/v1/uploads/{upload_id}/parts"
payload := strings.NewReader("{\n \"part_numbers\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://blob.vertracloud.app/v1/uploads/{upload_id}/parts")
.header("Content-Type", "application/json")
.body("{\n \"part_numbers\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/uploads/{upload_id}/parts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"part_numbers\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"part_number": 1,
"url": "https://storage.example/part-1",
"size": 67108864,
"headers": {
"content-length": "67108864"
}
}
]
}
Returns a signed upload URL for each part you ask for. Send each part’s bytes with a
PUT to its url, using exactly the headers returned. Part sizes are the part_size of the upload, except that the last part can be smaller. Part limits are in limits of usage and limits.
Scope: blob:write. Accepts an upload token.
Upload token: this route also accepts an upload token (Authorization: Bearer vcup_...) instead of an API key.
string
required
The multipart upload ID.
number[]
required
Part numbers to get URLs for, starting at 1. Up to 100 per call.
string
The workspace ID, when the blob belongs to a workspace. The call acts on the blob of the workspace owner and needs the
blob:read workspace permission (blob:manage on routes that change data). Leave it out to act on your own blob.Example request
curl -X POST "https://blob.vertracloud.app/v1/uploads/7c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f/parts" \
-H "Authorization: Bearer $VERTRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"part_numbers":[1,2]}'
Response
object[]
{
"response": [
{
"part_number": 1,
"url": "https://storage.example/part-1",
"size": 67108864,
"headers": {
"content-length": "67108864"
}
}
]
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
AUTH_TOKEN_MISSING(401): NoAuthorizationheader was sent.API_KEY_INVALID(401): The API key doesn’t exist, was revoked, or its secret doesn’t match.API_KEY_SCOPE_DENIED(403): The key lacks the scope this route needs (blob:readorblob:write);details.requirednames it.WORKSPACE_PERMISSION_DENIED(403): Only withworkspace_id: you’re not a member, or your role lacks the blob permission.WORKSPACE_NOT_FOUND(404): Only withworkspace_id: no workspace with that ID, or you’re not a member.BLOB_UPLOAD_TOKEN_INVALID(401): The upload token doesn’t exist, has expired or was revoked (only with an upload token).VALIDATION_ERROR(400): A parameter or body field failed validation.details.pathnames the field.BLOB_UPLOAD_NOT_FOUND(404): No upload with that ID in this account, or it was already completed or aborted.BLOB_UPLOAD_EXPIRED(410): The upload’s time limit has passed.
{
"code": "AUTH_TOKEN_MISSING"
}
{
"code": "API_KEY_SCOPE_DENIED"
}
{
"code": "WORKSPACE_NOT_FOUND"
}
{
"code": "VALIDATION_ERROR"
}
{
"code": "BLOB_UPLOAD_EXPIRED"
}