Get a download URL's headers
curl --request HEAD \
--url https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/downloadimport requests
url = "https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download"
response = requests.head(url)
print(response.text)const options = {method: 'HEAD'};
fetch('https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download', 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://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
]);
$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://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download"
req, _ := http.NewRequest("HEAD", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.head("https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download")
.asString();require 'uri'
require 'net/http'
url = URI("https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
response = http.request(request)
puts response.read_body{
"error": {
"message": "memory_limit_gib for size m must be between 8 and 128",
"type": "invalid_request_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Authentication service unavailable",
"type": "server_error",
"param": null,
"code": null
}
}{
"error": {
"message": "idempotent request still in flight",
"type": "server_error",
"param": null,
"code": null
}
}Files
Get a download URL's headers
The same headers as the GET, without the body. No file bytes are read.
HEAD
/
sailboxes
/
{sailbox_id}
/
files
/
download
Get a download URL's headers
curl --request HEAD \
--url https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/downloadimport requests
url = "https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download"
response = requests.head(url)
print(response.text)const options = {method: 'HEAD'};
fetch('https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download', 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://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
]);
$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://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download"
req, _ := http.NewRequest("HEAD", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.head("https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download")
.asString();require 'uri'
require 'net/http'
url = URI("https://sailbox-api.sailresearch.com/v1/sailboxes/{sailbox_id}/files/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
response = http.request(request)
puts response.read_body{
"error": {
"message": "memory_limit_gib for size m must be between 8 and 128",
"type": "invalid_request_error",
"param": null,
"code": null
}
}{
"error": {
"message": "Authentication service unavailable",
"type": "server_error",
"param": null,
"code": null
}
}{
"error": {
"message": "idempotent request still in flight",
"type": "server_error",
"param": null,
"code": null
}
}Path Parameters
Id of the Sailbox, as returned by create. It is sb_ followed by a UUID.
Query Parameters
The file the URL was minted for.
When the URL stops working, as a Unix timestamp in seconds.
Signature over the other parameters. Editing any of them invalidates it.
Present when the URL was minted with attachment.
Available options:
attachment Present when the URL was minted with immutable.
Available options:
immutable Response
The file's headers with no body: Content-Type, Content-Length, ETag, Last-Modified, and Accept-Ranges: bytes.