curl --request GET \
--url https://sandbox.circularo.com/api/v1/files/public/{publicHash}import requests
url = "https://sandbox.circularo.com/api/v1/files/public/{publicHash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/files/public/{publicHash}', 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://sandbox.circularo.com/api/v1/files/public/{publicHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.circularo.com/api/v1/files/public/{publicHash}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/files/public/{publicHash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/files/public/{publicHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Download a public file
GET /files/public/{publicHash}
Streams a file marked public, with no credential of any kind. It exists for the places a file has to be reachable by something that cannot sign in - an image inside a notification e-mail, a logo on a login screen - and it is the only file endpoint that asks for no authentication at all.
The link names the file and proves the right to it at once, so anyone holding it can fetch the file and the way to withdraw that is to stop the file being public. Which tenant it belongs to is not in the link, though - that is worked out from the address the request arrived at, so the same link answers only on the host it was issued for. A link that cannot be read, that belongs elsewhere, or that names a file no longer there is reported as not found without saying which of those it was.
No authorization: No authorization is required to call this endpoint.
curl --request GET \
--url https://sandbox.circularo.com/api/v1/files/public/{publicHash}import requests
url = "https://sandbox.circularo.com/api/v1/files/public/{publicHash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/files/public/{publicHash}', 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://sandbox.circularo.com/api/v1/files/public/{publicHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.circularo.com/api/v1/files/public/{publicHash}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.circularo.com/api/v1/files/public/{publicHash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/files/public/{publicHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Headers
Path Parameters
Public link of the file, made of the file's own hash and the secret held for it. It is handed out with a public file's metadata and is not the file's identifier on its own.
1^[A-Za-z0-9._-]+$"cir_s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwd3q9h8yfgc0mrvu7kx3.WBv2Jc8lXo3pQ9rT5uYhZaEwSdFgHjKmNbVcXzLqRt0"
Response
Streams the file content.