Get Blob Storage Usage and Plan Limits
curl --request GET \
--url https://blob.vertracloud.app/v1/statsimport requests
url = "https://blob.vertracloud.app/v1/stats"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://blob.vertracloud.app/v1/stats', 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://blob.vertracloud.app/v1/stats",
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://blob.vertracloud.app/v1/stats"
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://blob.vertracloud.app/v1/stats")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/stats")
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{
"response": {
"objects": 42,
"used_bytes": 2147483648,
"quota_bytes": 16106127360,
"over_quota_bytes": 0,
"estimated_overage_cents": 0,
"month_average_bytes": 1932735283,
"image_transformations_used": 120,
"public_base_url": "https://blob.vertracloud.dev/k7p2m9x4qa",
"limits": {
"max_simple_upload_bytes": 104857600,
"max_single_put_bytes": 104857600,
"max_object_bytes": 10737418240,
"min_part_bytes": 5242880,
"max_part_bytes": 5368709120,
"max_parts": 10000,
"max_open_uploads": 4,
"uploads_per_second": null,
"max_rules": 10,
"max_custom_domains": 3,
"metadata_enabled": true,
"share_password_enabled": true,
"no_cache_enabled": false,
"min_expiration_seconds": 604800,
"image_transformations_per_month": 4000
}
}
}
Account
Get Blob Storage Usage and Plan Limits
Returns storage used, the plan’s quota, the month average, image transformations used and the plan’s limits.
GET
/
v1
/
stats
Get Blob Storage Usage and Plan Limits
curl --request GET \
--url https://blob.vertracloud.app/v1/statsimport requests
url = "https://blob.vertracloud.app/v1/stats"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://blob.vertracloud.app/v1/stats', 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://blob.vertracloud.app/v1/stats",
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://blob.vertracloud.app/v1/stats"
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://blob.vertracloud.app/v1/stats")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/stats")
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{
"response": {
"objects": 42,
"used_bytes": 2147483648,
"quota_bytes": 16106127360,
"over_quota_bytes": 0,
"estimated_overage_cents": 0,
"month_average_bytes": 1932735283,
"image_transformations_used": 120,
"public_base_url": "https://blob.vertracloud.dev/k7p2m9x4qa",
"limits": {
"max_simple_upload_bytes": 104857600,
"max_single_put_bytes": 104857600,
"max_object_bytes": 10737418240,
"min_part_bytes": 5242880,
"max_part_bytes": 5368709120,
"max_parts": 10000,
"max_open_uploads": 4,
"uploads_per_second": null,
"max_rules": 10,
"max_custom_domains": 3,
"metadata_enabled": true,
"share_password_enabled": true,
"no_cache_enabled": false,
"min_expiration_seconds": 604800,
"image_transformations_per_month": 4000
}
}
}
Returns how much blob storage the account uses, its quota, the overage if any, and the
limits of the current plan. Read the limits here instead of hardcoding them: they change with the plan. The values in the example are illustrative.
Scope: blob:read.
string
The workspace ID, when the blob belongs to a workspace. The call acts on the blob of the workspace owner and needs the
blob:read workspace permission (blob:manage on routes that change data). Leave it out to act on your own blob.Example request
curl "https://blob.vertracloud.app/v1/stats" \
-H "Authorization: Bearer $VERTRA_API_KEY"
Response
object
Usage, quota and the limits of the plan.
Show properties
Show properties
number
Number of objects stored.
number
Bytes stored now.
number
Blob quota of the plan, in bytes.
number
Bytes above the quota. Above 0 only after a plan downgrade.
number
Estimated charge for the bytes above the quota, in cents, billed at renewal: R$0.20 per started GB.
number
Average stored bytes in the current month.
number
Image transformations used in the current month.
string
Base URL of the public files of the account.
number
Largest file accepted by
POST /v1/objects. 100 MB on every plan.number
Largest file that can be sent in one part of a direct upload.
number
Largest single object, 10 GB.
number
Smallest allowed part size for multipart uploads.
number
Largest allowed part size for multipart uploads.
number
Most parts a multipart upload can have.
number
How many direct uploads can be in progress at once on the plan.
number | null
Uploads allowed per second.
null means no limit of its own (Enterprise-12 or higher); below that, 1 per second.number
Folder rules allowed: 5, 10 or 20, by plan.
number
Custom domains allowed: 0, 1, 3 or 10, by plan.
boolean
Whether
metadata can be set (Enterprise-12 or higher).boolean
Whether share links can have a password (Enterprise-12 or higher).
boolean
Whether
cache_control: "no-cache" is allowed (Enterprise-26 or higher).number
Shortest
expires_at accepted, counted from now: 7 days, or 1 hour on Enterprise-26 or higher.number
Image transformations included per month.
0 on Economy and Pro.{
"response": {
"objects": 42,
"used_bytes": 2147483648,
"quota_bytes": 16106127360,
"over_quota_bytes": 0,
"estimated_overage_cents": 0,
"month_average_bytes": 1932735283,
"image_transformations_used": 120,
"public_base_url": "https://blob.vertracloud.dev/k7p2m9x4qa",
"limits": {
"max_simple_upload_bytes": 104857600,
"max_single_put_bytes": 104857600,
"max_object_bytes": 10737418240,
"min_part_bytes": 5242880,
"max_part_bytes": 5368709120,
"max_parts": 10000,
"max_open_uploads": 4,
"uploads_per_second": null,
"max_rules": 10,
"max_custom_domains": 3,
"metadata_enabled": true,
"share_password_enabled": true,
"no_cache_enabled": false,
"min_expiration_seconds": 604800,
"image_transformations_per_month": 4000
}
}
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
AUTH_TOKEN_MISSING(401): NoAuthorizationheader was sent.API_KEY_INVALID(401): The API key doesn’t exist, was revoked, or its secret doesn’t match.API_KEY_SCOPE_DENIED(403): The key lacks the scope this route needs (blob:readorblob:write);details.requirednames it.WORKSPACE_PERMISSION_DENIED(403): Only withworkspace_id: you’re not a member, or your role lacks the blob permission.WORKSPACE_NOT_FOUND(404): Only withworkspace_id: no workspace with that ID, or you’re not a member.
{
"code": "AUTH_TOKEN_MISSING"
}
{
"code": "API_KEY_SCOPE_DENIED"
}
{
"code": "WORKSPACE_NOT_FOUND"
}