curl --request POST \
--url https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"path": "/workspace/data.bin",
"size": 1048576
}
'import requests
url = "https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads"
payload = {
"path": "/workspace/data.bin",
"size": 1048576
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({path: '/workspace/data.bin', size: 1048576})
};
fetch('https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads', 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.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads",
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([
'path' => '/workspace/data.bin',
'size' => 1048576
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads"
payload := strings.NewReader("{\n \"path\": \"/workspace/data.bin\",\n \"size\": 1048576\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"path\": \"/workspace/data.bin\",\n \"size\": 1048576\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"path\": \"/workspace/data.bin\",\n \"size\": 1048576\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sandbox_id": "<string>",
"path": "<string>",
"size": 1,
"route": "direct",
"part_size": 1,
"parts": [
{
"number": 5000,
"size": 1,
"url": "<string>",
"method": "PUT",
"headers": {},
"form_field": "<string>"
}
],
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}Create a Sandbox File Upload
You can rely on:
- A completed upload leaves exactly the declared bytes at the path; a body of another length is refused.
You can set: path, size.
Not promised: removing bytes already written when an upload is aborted.
Starts an upload of a file of known size to an absolute path in a running sandbox. Send
every returned part as described by its TransferPart, then call completeSandboxUpload
with each part’s response ETag, if any. BoxRouter chooses the route; it is
informational and clients must not branch on it. Upload links and the session last up to
six hours after creation; expires_at says when they end. Launch behaviour is always
exactly one part. Idempotency-Key is required on create, complete and abort; repeat an
uncertain call with the same key.
Needs the sandbox file transfer switch. While the switch is off, which is the default, the
call is refused with 422 unsupported_feature. Inline file reads and writes are not affected.
curl --request POST \
--url https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"path": "/workspace/data.bin",
"size": 1048576
}
'import requests
url = "https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads"
payload = {
"path": "/workspace/data.bin",
"size": 1048576
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({path: '/workspace/data.bin', size: 1048576})
};
fetch('https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads', 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.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads",
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([
'path' => '/workspace/data.bin',
'size' => 1048576
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads"
payload := strings.NewReader("{\n \"path\": \"/workspace/data.bin\",\n \"size\": 1048576\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"path\": \"/workspace/data.bin\",\n \"size\": 1048576\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.boxrouter.ai/api/v1/sandboxes/{sandbox_id}/files/uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"path\": \"/workspace/data.bin\",\n \"size\": 1048576\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sandbox_id": "<string>",
"path": "<string>",
"size": 1,
"route": "direct",
"part_size": 1,
"parts": [
{
"number": 5000,
"size": 1,
"url": "<string>",
"method": "PUT",
"headers": {},
"form_field": "<string>"
}
],
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"requirement": "<string>",
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>"
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"agent": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>"
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"provider": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}Authorizations
Headers
Path Parameters
Body
Response
Created upload
Upload session. Send every part as its TransferPart describes, then complete with each
response ETag, if any. Part URLs may embed secret signatures: never log them. The links
and this session last up to six hours after creation and end at expires_at. At launch
there is exactly one part.