curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/files/capacity?token='import requests
url = "https://sandbox.circularo.com/api/v1/files/capacity?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/files/capacity?token=', 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/capacity?token=",
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/capacity?token="
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/capacity?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/files/capacity?token=")
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{
"limit": 1073741824,
"organizationLimit": 10737418240,
"organizationUsed": 4294967296,
"used": 52428800
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Get storage capacity
GET /files/capacity
Returns how much file storage the caller has taken up and how much they are allowed, so that a client can show the figure and warn before an upload is refused. An upload that would cross the limit is turned away, which is the same check this endpoint reports without uploading anything.
What comes back depends on how the caller is billed. A caller belonging to an organization is measured against their subscription, and the answer carries both their own usage and the organization’s as a whole - the organization limit is what is shared, the per-user one what any single member may take of it. A caller outside an organization who holds a subscription of their own is measured against it the same way, its whole pool being their own files. Any other caller outside an organization has only a personal figure, and the organization ones stay empty. Either limit may be empty, which means none is set and the usage is not capped. The figures are reported whatever state the subscription is in.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
curl --request GET \
--url 'https://sandbox.circularo.com/api/v1/files/capacity?token='import requests
url = "https://sandbox.circularo.com/api/v1/files/capacity?token="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.circularo.com/api/v1/files/capacity?token=', 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/capacity?token=",
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/capacity?token="
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/capacity?token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/files/capacity?token=")
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{
"limit": 1073741824,
"organizationLimit": 10737418240,
"organizationUsed": 4294967296,
"used": 52428800
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Response
Returns the caller's storage usage and the limits it is measured against.
Most the caller's organization may take up altogether, in bytes - the pool its members share. For a caller outside an organization who holds a subscription of their own, it is that subscription's pool. It stays empty for any other caller who belongs to no organization, and also where the subscription sets no such limit.
10737418240