import requests
url = "https://app.strandai.com/api/v1/uploads/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://app.strandai.com/api/v1/uploads/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.strandai.com/api/v1/uploads/{id}', 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://app.strandai.com/api/v1/uploads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.strandai.com/api/v1/uploads/{id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.strandai.com/api/v1/uploads/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.strandai.com/api/v1/uploads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadUrl": "<string>",
"gcsPath": "<string>",
"filename": "<string>",
"fileSize": "<string>",
"status": "uploading",
"existing": false,
"createdAt": "2023-11-07T05:31:56Z",
"widthPx": 123,
"heightPx": 123,
"autoSegment": true
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}Renew an upload session
Mints a fresh create-only (ifGenerationMatch=0) GCS resumable session URL for an existing permanent-bucket (deidBypassed) uploading sample in the calling organization that has no jobs or bound object generation, preserving the sample ID, object path, declared file size, content hash, and MPP snapshot. Replays the caller-supplied contentType recorded on new uploads, or infers the canonical WSI MIME type from filename on historical rows where contentType was not persisted. Prechecks permanent-bucket storage metadata and reconciles an already-finalized object before returning 409; quarantine uploads are rejected with a non-retryable 409 (reason: "quarantine_renewal_unsupported") without minting a session. Use this only when the prior uploadUrl was lost before completion or expired after GCS’s 7-day resumable session TTL; when a known uploadUrl returns 308 Resume Incomplete, resume from its acknowledged byte offset instead. Stream the full declared bytes starting from byte offset 0 to the new uploadUrl, then poll GET /uploads/{id} until the sample leaves uploading.
import requests
url = "https://app.strandai.com/api/v1/uploads/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://app.strandai.com/api/v1/uploads/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.strandai.com/api/v1/uploads/{id}', 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://app.strandai.com/api/v1/uploads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.strandai.com/api/v1/uploads/{id}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.strandai.com/api/v1/uploads/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.strandai.com/api/v1/uploads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uploadUrl": "<string>",
"gcsPath": "<string>",
"filename": "<string>",
"fileSize": "<string>",
"status": "uploading",
"existing": false,
"createdAt": "2023-11-07T05:31:56Z",
"widthPx": 123,
"heightPx": 123,
"autoSegment": true
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"reason": "<string>",
"required": 123,
"retryAfterSeconds": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Renewed resumable upload URL
Fresh create-only (ifGenerationMatch=0) GCS resumable upload URL. Stream the full declared bytes starting from byte offset 0.
bytes, stringified bigint
uploading false Was this page helpful?