Refresh multipart part URLs
Presigns new PUT URLs for parts of an in-flight multipart upload, when the original URLs
expired. Parts already uploaded are kept. The response omits content_length; keep the
part sizes from the start of the upload.
Requires the account_admin or developer role and Serve access.
POST
/
projects
/
{proj_id}
/
weights
/
{set}
/
uploads
/
multipart
/
refresh
Refresh multipart part URLs
curl --request POST \
--url https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upload_id": "2~nC3yQeXbVZ8a",
"key": "partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"part_numbers": [
2
]
}
'import requests
url = "https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh"
payload = {
"upload_id": "2~nC3yQeXbVZ8a",
"key": "partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"part_numbers": [2]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upload_id: '2~nC3yQeXbVZ8a',
key: 'partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae',
part_numbers: [2]
})
};
fetch('https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh', 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://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh",
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([
'upload_id' => '2~nC3yQeXbVZ8a',
'key' => 'partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae',
'part_numbers' => [
2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh"
payload := strings.NewReader("{\n \"upload_id\": \"2~nC3yQeXbVZ8a\",\n \"key\": \"partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\",\n \"part_numbers\": [\n 2\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upload_id\": \"2~nC3yQeXbVZ8a\",\n \"key\": \"partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\",\n \"part_numbers\": [\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upload_id\": \"2~nC3yQeXbVZ8a\",\n \"key\": \"partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\",\n \"part_numbers\": [\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"parts": [
{
"part_number": 2,
"url": "https://storage.example.com/part?n=2&signature=..."
}
]
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}Authorizations
A Reactor API key (rk_...), sent as Authorization: Bearer rk_.... Keep it on a server.
Path Parameters
The project's ID, a UUID. It is not the model's ID.
The full set digest, sha256:<64 hex> or the 64 hex characters. A tag or prefix is not accepted.
Body
application/json
Response
New part URLs.
Show child attributes
Show child attributes
⌘I
Refresh multipart part URLs
curl --request POST \
--url https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upload_id": "2~nC3yQeXbVZ8a",
"key": "partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"part_numbers": [
2
]
}
'import requests
url = "https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh"
payload = {
"upload_id": "2~nC3yQeXbVZ8a",
"key": "partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"part_numbers": [2]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upload_id: '2~nC3yQeXbVZ8a',
key: 'partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae',
part_numbers: [2]
})
};
fetch('https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh', 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://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh",
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([
'upload_id' => '2~nC3yQeXbVZ8a',
'key' => 'partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae',
'part_numbers' => [
2
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh"
payload := strings.NewReader("{\n \"upload_id\": \"2~nC3yQeXbVZ8a\",\n \"key\": \"partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\",\n \"part_numbers\": [\n 2\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upload_id\": \"2~nC3yQeXbVZ8a\",\n \"key\": \"partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\",\n \"part_numbers\": [\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upload_id\": \"2~nC3yQeXbVZ8a\",\n \"key\": \"partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\",\n \"part_numbers\": [\n 2\n ]\n}"
response = http.request(request)
puts response.read_body{
"parts": [
{
"part_number": 2,
"url": "https://storage.example.com/part?n=2&signature=..."
}
]
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}